Library/ManagedCuda/CudaDNN/FilterDescriptor.cs
/// <summary>
/// This function initializes a previously created filter descriptor object into a 4D filter.
/// Filters layout must be contiguous in memory.
/// </summary>
/// <param name="dataType">Data type.</param>
/// <param name="format">Enumerant holding the layout format.</param>
/// <param name="k">Number of output feature maps.</param>
/// <param name="c">Number of input feature maps.</param>
/// <param name="h">Height of each filter.</param>
/// <param name="w">Width of each filter.</param>
This function initializes a previously created filter descriptor object into a 4D filter.
Filters layout must be contiguous in memory.
This function initializes a previously created filter descriptor object into a 4D filter . Filters layout must be contiguous in memory .
public void SetFilter4dDescriptor(cudnnDataType dataType, 
                                                cudnnTensorFormat format,
												int k,        
												int c,        
												int h,        
												int w         
											)
		{
			res = CudaDNNNativeMethods.cudnnSetFilter4dDescriptor(_desc, dataType, format, k, c, h, w);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnSetFilter4dDescriptor", res));
			if (res != cudnnStatus.Success) throw new CudaDNNException(res);
		}
public void SetFilter4dDescriptor ( cudnnDataType dataType , cudnnTensorFormat format , int k , int c , int h , int w ) { res = CudaDNNNativeMethods . cudnnSetFilter4dDescriptor ( _desc , dataType , format , k , c , h , w ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; }
This function initializes a previously created filter descriptor object into a 4D filter.
This function initializes a previously created filter descriptor object into a 4D filter .
// image data type // number of output feature maps // number of input feature maps // height of each input filter // width of  each input fitler
dataType
cudnnDataType
None
format
cudnnTensorFormat
Enumerant holding the layout format.
Enumerant holding the layout format .
k
int
Number of output feature maps.
Number of output feature maps .
c
int
Number of input feature maps.
Number of input feature maps .
h
int
Height of each filter.
Height of each filter .
w
int
Width of each filter.
Width of each filter .