Library/ManagedCuda/CudaDNN/CudaDNNContext.cs
/// <summary>  
/// This function performs forward dropout operation over x returning results in y. If dropout was   
/// used as a parameter to cudnnSetDropoutDescriptor, the approximately dropout fraction of x values   
/// will be replaces by 0, and the rest will be scaled by 1/(1-dropout) This function should not be   
/// running concurrently with another cudnnDropoutForward function using the same states.  
/// </summary>  
/// <param name="dropoutDesc">Handle to a previously created dropout descriptor object.</param>  
/// <param name="xDesc">Handle to the previously initialized input tensor descriptor.</param>  
/// <param name="x">Data pointer to GPU memory associated with the tensor descriptor srcDesc.</param>  
/// <param name="yDesc">Handle to the previously initialized output tensor descriptor.</param>  
/// <param name="y">Data pointer to GPU memory associated with the output tensor descriptor destDesc.</param>  
/// <param name="reserveSpace">Data pointer to GPU memory used by this function. It is expected that contents of reserveSpace doe not change between cudnnDropoutForward and cudnnDropoutBackward calls.</param>  
This function performs forward dropout operation over x returning results in y. If dropout was
used as a parameter to cudnnSetDropoutDescriptor, the approximately dropout fraction of x values
will be replaces by 0, and the rest will be scaled by 1/(1-dropout) This function should not be
running concurrently with another cudnnDropoutForward function using the same states.
This function performs forward dropout operation over x returning results in y . If dropout was used as a parameter to cudnnSetDropoutDescriptor the approximately dropout fraction of x values will be replaces by 0 and the rest will be scaled by 1 / ( 1 - dropout ) This function should not be running concurrently with another cudnnDropoutForward function using the same states .
public void DropoutForward(DropoutDescriptor dropoutDesc,
                                   TensorDescriptor xDesc,
                                   CudaDeviceVariable<double> x,
                                   TensorDescriptor yDesc,
                                   CudaDeviceVariable<double> y,
                                   CudaDeviceVariable<byte> reserveSpace)
        {
            res = CudaDNNNativeMethods.cudnnDropoutForward(_handle, dropoutDesc.Desc, xDesc.Desc, x.DevicePointer, yDesc.Desc, y.DevicePointer, reserveSpace.DevicePointer, reserveSpace.SizeInBytes);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnDropoutForward", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
public void DropoutForward ( DropoutDescriptor dropoutDesc , TensorDescriptor xDesc , CudaDeviceVariable < double > x , TensorDescriptor yDesc , CudaDeviceVariable < double > y , CudaDeviceVariable < byte > reserveSpace ) { res = CudaDNNNativeMethods . cudnnDropoutForward ( _handle , dropoutDesc . Desc , xDesc . Desc , x . DevicePointer , yDesc . Desc , y . DevicePointer , reserveSpace . DevicePointer , reserveSpace . SizeInBytes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; }
This function performs forward dropout operation over x returning results in y.
This function performs forward dropout operation over x returning results in y .
dropoutDesc
DropoutDescriptor
Handle to a previously created dropout descriptor object.
Handle to a previously created dropout descriptor object .
xDesc
TensorDescriptor
Handle to the previously initialized input tensor descriptor.
Handle to the previously initialized input tensor descriptor .
x
CudaDeviceVariable<double>
Data pointer to GPU memory associated with the tensor descriptor srcDesc.
Data pointer to GPU memory associated with the tensor descriptor srcDesc .
yDesc
TensorDescriptor
Handle to the previously initialized output tensor descriptor.
Handle to the previously initialized output tensor descriptor .
y
CudaDeviceVariable<double>
Data pointer to GPU memory associated with the output tensor descriptor destDesc.
Data pointer to GPU memory associated with the output tensor descriptor destDesc .
reserveSpace
CudaDeviceVariable<byte>
Data pointer to GPU memory used by this function. It is expected that contents of reserveSpace doe not change between cudnnDropoutForward and cudnnDropoutBackward calls.
Data pointer to GPU memory used by this function . It is expected that contents of reserveSpace doe not change between cudnnDropoutForward and cudnnDropoutBackward calls .