Library/ManagedCuda/CudaDNN/LRNDescriptor.cs
/// <summary>
/// This function performs the forward DivisiveNormalization layer computation.
/// </summary>
/// <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 objects for the input and output tensors. Note that
/// srcDesc is shared between srcData, srcMeansData, tempData, tempData2
/// tensors.</param>
/// <param name="x">Input tensor data pointer in device memory.</param>
/// <param name="means">Input means tensor data pointer in device memory. Note that this tensor
/// can be NULL (in that case it's values are assumed to be zero during the
/// computation). This tensor also doesn't have to contain means, these can
/// be any values, a frequently used variation is a result of convolution with a
/// normalized positive kernel (such as Gaussian).</param>
/// <param name="temp">Temporary tensors in device memory. These are used for computing
/// intermediate values during the forward pass. These tensors do not have
/// to be preserved as inputs from forward to the 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 forward pass. These tensors do not have
/// to be preserved as inputs from forward to the 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="yDesc">Tensor descriptor objects for the input and output tensors. Note that
/// srcDesc is shared between srcData, srcMeansData, tempData, tempData2
/// tensors.</param>
/// <param name="y">Pointer in device memory to a tensor for the result of the forward DivisiveNormalization pass.</param>
This function performs the forward DivisiveNormalization layer computation.
This function performs the forward DivisiveNormalization layer computation .
public void cudnnDivisiveNormalizationForward(
                                      cudnnDivNormMode mode,
                                      float alpha,
                                      cudnnTensorDescriptor xDesc, 
                                      CUdeviceptr x,
                                      CUdeviceptr means, 
                                      CUdeviceptr temp,
                                      CUdeviceptr temp2,
                                      float beta,
                                      cudnnTensorDescriptor yDesc,
                                      CUdeviceptr y)
        {
            res = CudaDNNNativeMethods.cudnnDivisiveNormalizationForward(_handle, _desc, mode, ref alpha, xDesc, x, means, temp, temp2, ref beta, yDesc, y);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnDivisiveNormalizationForward", res));
			if (res != cudnnStatus.Success) throw new CudaDNNException(res);
		}
public void cudnnDivisiveNormalizationForward ( cudnnDivNormMode mode , float alpha , cudnnTensorDescriptor xDesc , CUdeviceptr x , CUdeviceptr means , CUdeviceptr temp , CUdeviceptr temp2 , float beta , cudnnTensorDescriptor yDesc , CUdeviceptr y ) { res = CudaDNNNativeMethods . cudnnDivisiveNormalizationForward ( _handle , _desc , mode , ref alpha , xDesc , x , means , temp , temp2 , ref beta , yDesc , y ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; }
This function performs the forward DivisiveNormalization layer computation.
This function performs the forward DivisiveNormalization layer computation .
// same desc for means, temp, temp2 // if NULL, means are assumed to be zero
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 .
alpha
float
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 .
xDesc
cudnnTensorDescriptor
Tensor descriptor objects for the input and output tensors. Note that
srcDesc is shared between srcData, srcMeansData, tempData, tempData2
tensors.
Tensor descriptor objects for the input and output tensors . Note that srcDesc is shared between srcData srcMeansData tempData tempData2 tensors .
x
CUdeviceptr
Input tensor data pointer in device memory.
Input tensor data pointer in device memory .
means
CUdeviceptr
Input means tensor data pointer in device memory. Note that this tensor
can be NULL (in that case it's values are assumed to be zero during the
computation). This tensor also doesn't have to contain means, these can
be any values, a frequently used variation is a result of convolution with a
normalized positive kernel (such as Gaussian).
Input means tensor data pointer in device memory . Note that this tensor can be NULL ( in that case it ' s values are assumed to be zero during the computation ) . This tensor also doesn ' t have to contain means these can be any values a frequently used variation is a result of convolution with a normalized positive kernel ( such as Gaussian ) .
temp
CUdeviceptr
Temporary tensors in device memory. These are used for computing
intermediate values during the forward pass. These tensors do not have
to be preserved as inputs from forward to the backward pass. Both use
srcDesc as a descriptor.
Temporary tensors in device memory . These are used for computing intermediate values during the forward pass . These tensors do not have to be preserved as inputs from forward to the backward pass . Both use srcDesc as a descriptor .
temp2
CUdeviceptr
Temporary tensors in device memory. These are used for computing
intermediate values during the forward pass. These tensors do not have
to be preserved as inputs from forward to the backward pass. Both use
srcDesc as a descriptor.
Temporary tensors in device memory . These are used for computing intermediate values during the forward pass . These tensors do not have to be preserved as inputs from forward to the backward pass . Both use srcDesc as a descriptor .
beta
float
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 .
yDesc
cudnnTensorDescriptor
Tensor descriptor objects for the input and output tensors. Note that
srcDesc is shared between srcData, srcMeansData, tempData, tempData2
tensors.
Tensor descriptor objects for the input and output tensors . Note that srcDesc is shared between srcData srcMeansData tempData tempData2 tensors .
y
CUdeviceptr
Pointer in device memory to a tensor for the result of the forward DivisiveNormalization pass.
Pointer in device memory to a tensor for the result of the forward DivisiveNormalization pass .