Library/ManagedCuda/CudaDNN/CudaDNNNativeMethods.cs
/// <summary>
/// This function performs the backward DivisiveNormalization layer computation.
/// </summary>
/// <param name="handle">Handle to a previously created cuDNN library descriptor.</param>
/// <param name="normDesc">Handle to a previously intialized LRN parameter descriptor (this descriptor
/// is used for both LRN and DivisiveNormalization layers).</param>
/// <param name="mode">DivisiveNormalization layer mode of operation. Currently only
/// CUDNN_DIVNORM_PRECOMPUTED_MEANS is implemented. Normalization
/// is performed using the means input tensor that is expected to be
/// precomputed by the user.</param>
/// <param name="alpha">Pointer to scaling factors (in host memory) used to blend the layer output
/// value with prior value in the destination tensor as follows: dstValue =
/// alpha[0]*resultValue + beta[0]*priorDstValue. Please refer to this section
/// for additional details.</param>
/// <param name="xDesc">Tensor descriptor and pointers in device memory for the bottom layer's
/// data and means. (Bottom layer is the earlier layer in the computation
/// graph during inference). Note: the means tensor is expected to be
/// precomputed by the user. It can also contain any valid values (not required
/// to be actual means, and can be for instance a result of a convolution with
/// a Gaussian kernel).</param>
/// <param name="x">Tensor descriptor and pointers in device memory for the bottom layer's
/// data and means. (Bottom layer is the earlier layer in the computation
/// graph during inference). Note: the means tensor is expected to be
/// precomputed by the user. It can also contain any valid values (not required
/// to be actual means, and can be for instance a result of a convolution with
/// a Gaussian kernel).</param>
/// <param name="means">Tensor descriptor and pointers in device memory for the bottom layer's
/// data and means. (Bottom layer is the earlier layer in the computation
/// graph during inference). Note: the means tensor is expected to be
/// precomputed by the user. It can also contain any valid values (not required
/// to be actual means, and can be for instance a result of a convolution with
/// a Gaussian kernel).</param>
/// <param name="dy">Tensor pointer in device memory for the top layer's cumulative loss
/// differential data (error backpropagation). (Top layer is the later layer in
/// the computation graph during inference).</param>
/// <param name="temp">Temporary tensors in device memory. These are used for computing
/// intermediate values during the backward pass. These tensors do not have
/// to be preserved from forward to backward pass. Both use srcDesc as a
/// descriptor.</param>
/// <param name="temp2">Temporary tensors in device memory. These are used for computing
/// intermediate values during the backward pass. These tensors do not have
/// to be preserved from forward to backward pass. Both use srcDesc as a
/// descriptor.</param>
/// <param name="beta">Pointer to scaling factors (in host memory) used to blend the layer output
/// value with prior value in the destination tensor as follows: dstValue =
/// alpha[0]*resultValue + beta[0]*priorDstValue. Please refer to this section
/// for additional details.</param>
/// <param name="dXdMeansDesc">Tensor descriptor for destDataDiff and destMeansDiff.</param>
/// <param name="dx">Tensor pointers (in device memory) for the bottom layer's resulting
/// differentials (data and means). Both share the same descriptor.</param>
/// <param name="dMeans">Tensor pointers (in device memory) for the bottom layer's resulting
/// differentials (data and means). Both share the same descriptor.</param>
This function performs the backward DivisiveNormalization layer computation.
This function performs the backward DivisiveNormalization layer computation .
[DllImport(CUDNN_API_DLL_NAME)]
		public static extern cudnnStatus cudnnDivisiveNormalizationBackward(
									  cudnnHandle                    handle,
									  cudnnLRNDescriptor             normDesc,
									  cudnnDivNormMode               mode,
									  ref double alpha,
									  cudnnTensorDescriptor    xDesc, 
									  CUdeviceptr x,
									  CUdeviceptr means, 
									  CUdeviceptr dy,
									  CUdeviceptr temp,
									  CUdeviceptr temp2,
									  ref double beta,
									  cudnnTensorDescriptor    dXdMeansDesc, 
									  CUdeviceptr dx, 
									  CUdeviceptr dMeans 
									  );
[ DllImport ( CUDNN_API_DLL_NAME ) ] public static extern cudnnStatus cudnnDivisiveNormalizationBackward ( cudnnHandle handle , cudnnLRNDescriptor normDesc , cudnnDivNormMode mode , ref double alpha , cudnnTensorDescriptor xDesc , CUdeviceptr x , CUdeviceptr means , CUdeviceptr dy , CUdeviceptr temp , CUdeviceptr temp2 , ref double beta , cudnnTensorDescriptor dXdMeansDesc , CUdeviceptr dx , CUdeviceptr dMeans ) ;
This function performs the backward DivisiveNormalization layer computation.
This function performs the backward DivisiveNormalization layer computation .
// same desc for diff, means, temp, temp2 // if NULL, means are assumed to be zero // same desc for dest, means, meansDiff // output data differential // output means differential, can be NULL
handle
cudnnHandle
Handle to a previously created cuDNN library descriptor.
Handle to a previously created cuDNN library descriptor .
normDesc
cudnnLRNDescriptor
Handle to a previously intialized LRN parameter descriptor (this descriptor
is used for both LRN and DivisiveNormalization layers).
Handle to a previously intialized LRN parameter descriptor ( this descriptor is used for both LRN and DivisiveNormalization layers ) .
mode
cudnnDivNormMode
DivisiveNormalization layer mode of operation. Currently only
CUDNN_DIVNORM_PRECOMPUTED_MEANS is implemented. Normalization
is performed using the means input tensor that is expected to be
precomputed by the user.
DivisiveNormalization layer mode of operation . Currently only CUDNN_DIVNORM_PRECOMPUTED_MEANS is implemented . Normalization is performed using the means input tensor that is expected to be precomputed by the user .
double
ref
xDesc
cudnnTensorDescriptor
Tensor descriptor and pointers in device memory for the bottom layer's
data and means. (Bottom layer is the earlier layer in the computation
graph during inference). Note: the means tensor is expected to be
precomputed by the user. It can also contain any valid values (not required
to be actual means, and can be for instance a result of a convolution with
a Gaussian kernel).
Tensor descriptor and pointers in device memory for the bottom layer ' s data and means . ( Bottom layer is the earlier layer in the computation graph during inference ) . Note : the means tensor is expected to be precomputed by the user . It can also contain any valid values ( not required to be actual means and can be for instance a result of a convolution with a Gaussian kernel ) .
x
CUdeviceptr
Tensor descriptor and pointers in device memory for the bottom layer's
data and means. (Bottom layer is the earlier layer in the computation
graph during inference). Note: the means tensor is expected to be
precomputed by the user. It can also contain any valid values (not required
to be actual means, and can be for instance a result of a convolution with
a Gaussian kernel).
Tensor descriptor and pointers in device memory for the bottom layer ' s data and means . ( Bottom layer is the earlier layer in the computation graph during inference ) . Note : the means tensor is expected to be precomputed by the user . It can also contain any valid values ( not required to be actual means and can be for instance a result of a convolution with a Gaussian kernel ) .
means
CUdeviceptr
Tensor descriptor and pointers in device memory for the bottom layer's
data and means. (Bottom layer is the earlier layer in the computation
graph during inference). Note: the means tensor is expected to be
precomputed by the user. It can also contain any valid values (not required
to be actual means, and can be for instance a result of a convolution with
a Gaussian kernel).
Tensor descriptor and pointers in device memory for the bottom layer ' s data and means . ( Bottom layer is the earlier layer in the computation graph during inference ) . Note : the means tensor is expected to be precomputed by the user . It can also contain any valid values ( not required to be actual means and can be for instance a result of a convolution with a Gaussian kernel ) .
dy
CUdeviceptr
Tensor pointer in device memory for the top layer's cumulative loss
differential data (error backpropagation). (Top layer is the later layer in
the computation graph during inference).
Tensor pointer in device memory for the top layer ' s cumulative loss differential data ( error backpropagation ) . ( Top layer is the later layer in the computation graph during inference ) .
temp
CUdeviceptr
Temporary tensors in device memory. These are used for computing
intermediate values during the backward pass. These tensors do not have
to be preserved from forward to backward pass. Both use srcDesc as a
descriptor.
Temporary tensors in device memory . These are used for computing intermediate values during the backward pass . These tensors do not have to be preserved from forward to backward pass . Both use srcDesc as a descriptor .
temp2
CUdeviceptr
Temporary tensors in device memory. These are used for computing
intermediate values during the backward pass. These tensors do not have
to be preserved from forward to backward pass. Both use srcDesc as a
descriptor.
Temporary tensors in device memory . These are used for computing intermediate values during the backward pass . These tensors do not have to be preserved from forward to backward pass . Both use srcDesc as a descriptor .
dXdMeansDesc
cudnnTensorDescriptor
Tensor descriptor for destDataDiff and destMeansDiff.
Tensor descriptor for destDataDiff and destMeansDiff .
dx
CUdeviceptr
Tensor pointers (in device memory) for the bottom layer's resulting
differentials (data and means). Both share the same descriptor.
Tensor pointers ( in device memory ) for the bottom layer ' s resulting differentials ( data and means ) . Both share the same descriptor .
dMeans
CUdeviceptr
Tensor pointers (in device memory) for the bottom layer's resulting
differentials (data and means). Both share the same descriptor.
Tensor pointers ( in device memory ) for the bottom layer ' s resulting differentials ( data and means ) . Both share the same descriptor .
alpha
Pointer to scaling factors (in host memory) used to blend the layer output
value with prior value in the destination tensor as follows: dstValue
alpha[0]*resultValue + beta[0]*priorDstValue. Please refer to this section
for additional details.
Pointer to scaling factors ( in host memory ) used to blend the layer output value with prior value in the destination tensor as follows : dstValue alpha [ 0 ] * resultValue + beta [ 0 ] * priorDstValue . Please refer to this section for additional details .
beta
Pointer to scaling factors (in host memory) used to blend the layer output
value with prior value in the destination tensor as follows: dstValue
alpha[0]*resultValue + beta[0]*priorDstValue. Please refer to this section
for additional details.
Pointer to scaling factors ( in host memory ) used to blend the layer output value with prior value in the destination tensor as follows : dstValue alpha [ 0 ] * resultValue + beta [ 0 ] * priorDstValue . Please refer to this section for additional details .