Library/ManagedCuda/CudaDNN/CudaDNNContext.cs
/// <summary>
/// This function computes the convolution gradient with respect to the bias, which is the
/// sum of every element belonging to the same feature map across all of the images of the
/// input tensor. Therefore, the number of elements produced is equal to the number of
/// features maps of the input tensor.
/// </summary>
/// <param name="alpha">Pointer to scaling factors (in host memory) used to blend the computation
/// result with prior value in the output layer as follows: dstValue =
/// alpha[0]*result + beta[0]*priorDstValue. Please refer to this section for
/// additional details.</param>
/// <param name="dyDesc">Handle to the previously initialized input tensor descriptor.</param>
/// <param name="dy">Data pointer to GPU memory associated with the tensor descriptor srcDesc.</param>
/// <param name="beta">Pointer to scaling factors (in host memory) used to blend the computation
/// result with prior value in the output layer as follows: dstValue =
/// alpha[0]*result + beta[0]*priorDstValue. Please refer to this section for
/// additional details.</param>
/// <param name="dbDesc">Handle to the previously initialized output tensor descriptor.</param>
/// <param name="db">Data pointer to GPU memory associated with the output tensor descriptor destDesc.</param>
This function computes the convolution gradient with respect to the bias, which is the
sum of every element belonging to the same feature map across all of the images of the
input tensor. Therefore, the number of elements produced is equal to the number of
features maps of the input tensor.
This function computes the convolution gradient with respect to the bias which is the sum of every element belonging to the same feature map across all of the images of the input tensor . Therefore the number of elements produced is equal to the number of features maps of the input tensor .
public void ConvolutionBackwardBias(float alpha,
                                            TensorDescriptor dyDesc,
                                            CudaDeviceVariable<float> dy,
                                            float beta,
                                            TensorDescriptor dbDesc,
                                            CudaDeviceVariable<float> db
                                    )
        {
            res = CudaDNNNativeMethods.cudnnConvolutionBackwardBias(_handle, ref alpha, dyDesc.Desc, dy.DevicePointer, ref beta, dbDesc.Desc, db.DevicePointer);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnConvolutionBackwardBias", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
public void ConvolutionBackwardBias ( float alpha , TensorDescriptor dyDesc , CudaDeviceVariable < float > dy , float beta , TensorDescriptor dbDesc , CudaDeviceVariable < float > db ) { res = CudaDNNNativeMethods . cudnnConvolutionBackwardBias ( _handle , ref alpha , dyDesc . Desc , dy . DevicePointer , ref beta , dbDesc . Desc , db . DevicePointer ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; }
This function computes the convolution gradient with respect to the bias, which is the
sum of every element belonging to the same feature map across all of the images of the
input tensor.
This function computes the convolution gradient with respect to the bias which is the sum of every element belonging to the same feature map across all of the images of the input tensor .
alpha
float
Pointer to scaling factors (in host memory) used to blend the computation
result with prior value in the output layer as follows: dstValue
alpha[0]*result + beta[0]*priorDstValue. Please refer to this section for
additional details.
Pointer to scaling factors ( in host memory ) used to blend the computation result with prior value in the output layer as follows : dstValue alpha [ 0 ] * result + beta [ 0 ] * priorDstValue . Please refer to this section for additional details .
dyDesc
TensorDescriptor
Handle to the previously initialized input tensor descriptor.
Handle to the previously initialized input tensor descriptor .
dy
CudaDeviceVariable<float>
Data pointer to GPU memory associated with the tensor descriptor srcDesc.
Data pointer to GPU memory associated with the tensor descriptor srcDesc .
beta
float
Pointer to scaling factors (in host memory) used to blend the computation
result with prior value in the output layer as follows: dstValue
alpha[0]*result + beta[0]*priorDstValue. Please refer to this section for
additional details.
Pointer to scaling factors ( in host memory ) used to blend the computation result with prior value in the output layer as follows : dstValue alpha [ 0 ] * result + beta [ 0 ] * priorDstValue . Please refer to this section for additional details .
dbDesc
TensorDescriptor
Handle to the previously initialized output tensor descriptor.
Handle to the previously initialized output tensor descriptor .
db
CudaDeviceVariable<float>
Data pointer to GPU memory associated with the output tensor descriptor destDesc.
Data pointer to GPU memory associated with the output tensor descriptor destDesc .