Library/ManagedCuda/CudaDNN/TensorDescriptor.cs
/// <summary>
/// This function queries the parameters of the previouly initialized Tensor4D descriptor object.
/// </summary>
/// <param name="dataType">Data type.</param>
/// <param name="n">Number of images.</param>
/// <param name="c">Number of feature maps per image.</param>
/// <param name="h">Height of each feature map.</param>
/// <param name="w">Width of each feature map.</param>
/// <param name="nStride">Stride between two consecutive images.</param>
/// <param name="cStride">Stride between two consecutive feature maps.</param>
/// <param name="hStride">Stride between two consecutive rows.</param>
/// <param name="wStride">Stride between two consecutive columns.</param>
This function queries the parameters of the previouly initialized Tensor4D descriptor object.
This function queries the parameters of the previouly initialized Tensor4D descriptor object .
public void GetTensor4dDescriptor(ref cudnnDataType dataType, 
                                            ref int n,        
                                            ref int c,        
                                            ref int h,        
                                            ref int w,        
                                            ref int nStride,
                                            ref int cStride,
                                            ref int hStride,
                                            ref int wStride
                                        )
        {
            res = CudaDNNNativeMethods.cudnnGetTensor4dDescriptor(_desc, ref dataType, ref n, ref c, ref h, ref w, ref nStride, ref cStride, ref hStride, ref wStride);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnGetTensor4dDescriptor", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
public void GetTensor4dDescriptor ( ref cudnnDataType dataType , ref int n , ref int c , ref int h , ref int w , ref int nStride , ref int cStride , ref int hStride , ref int wStride ) { res = CudaDNNNativeMethods . cudnnGetTensor4dDescriptor ( _desc , ref dataType , ref n , ref c , ref h , ref w , ref nStride , ref cStride , ref hStride , ref wStride ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; }
This function queries the parameters of the previouly initialized Tensor4D descriptor object.
This function queries the parameters of the previouly initialized Tensor4D descriptor object .
// image data type // number of inputs (batch size) // number of input feature maps // height of input section // width of input section
cudnnDataType
ref
int
ref
dataType
None
n
Number of images.
Number of images .
c
Number of feature maps per image.
Number of feature maps per image .
h
Height of each feature map.
Height of each feature map .
w
Width of each feature map.
Width of each feature map .
nStride
Stride between two consecutive images.
Stride between two consecutive images .
cStride
Stride between two consecutive feature maps.
Stride between two consecutive feature maps .
hStride
Stride between two consecutive rows.
Stride between two consecutive rows .
wStride
Stride between two consecutive columns.
Stride between two consecutive columns .