Library/ManagedCuda/CudaDNN/CudaDNNContext.cs
/// <summary>  
/// This function performs backward dropout operation over dy returning results in dx. If during   
/// forward dropout operation value from x was propagated to y then during backward operation value   
/// from dy will be propagated to dx, otherwise, dx value will be set to 0.  
/// </summary>  
/// <param name="dropoutDesc">Handle to a previously created dropout descriptor object.</param>  
/// <param name="dyDesc">Handle to a previously initialized tensor descriptor.</param>  
/// <param name="dy">Pointer to data of the tensor described by the dyDesc descriptor.</param>  
/// <param name="dxDesc">Handle to a previously initialized tensor descriptor.</param>  
/// <param name="dx">Pointer to data of the tensor described by the dxDesc descriptor.</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 backward dropout operation over dy returning results in dx. If during
forward dropout operation value from x was propagated to y then during backward operation value
from dy will be propagated to dx, otherwise, dx value will be set to 0.
This function performs backward dropout operation over dy returning results in dx . If during forward dropout operation value from x was propagated to y then during backward operation value from dy will be propagated to dx otherwise dx value will be set to 0 .
public void DropoutBackward(DropoutDescriptor dropoutDesc,
                                    TensorDescriptor dyDesc,
                                    CudaDeviceVariable<float> dy,
                                    TensorDescriptor dxDesc,
                                    CudaDeviceVariable<float> dx,
                                    CudaDeviceVariable<byte> reserveSpace)
        {
            res = CudaDNNNativeMethods.cudnnDropoutBackward(_handle, dropoutDesc.Desc, dyDesc.Desc, dy.DevicePointer, dxDesc.Desc, dx.DevicePointer, reserveSpace.DevicePointer, reserveSpace.SizeInBytes);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cudnnDropoutBackward", res));
            if (res != cudnnStatus.Success) throw new CudaDNNException(res);
        }
public void DropoutBackward ( DropoutDescriptor dropoutDesc , TensorDescriptor dyDesc , CudaDeviceVariable < float > dy , TensorDescriptor dxDesc , CudaDeviceVariable < float > dx , CudaDeviceVariable < byte > reserveSpace ) { res = CudaDNNNativeMethods . cudnnDropoutBackward ( _handle , dropoutDesc . Desc , dyDesc . Desc , dy . DevicePointer , dxDesc . Desc , dx . DevicePointer , reserveSpace . DevicePointer , reserveSpace . SizeInBytes ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cudnnStatus . Success ) throw new CudaDNNException ( res ) ; }
This function performs backward dropout operation over dy returning results in dx.
This function performs backward dropout operation over dy returning results in dx .
dropoutDesc
DropoutDescriptor
Handle to a previously created dropout descriptor object.
Handle to a previously created dropout descriptor object .
dyDesc
TensorDescriptor
Handle to a previously initialized tensor descriptor.
Handle to a previously initialized tensor descriptor .
dy
CudaDeviceVariable<float>
Pointer to data of the tensor described by the dyDesc descriptor.
Pointer to data of the tensor described by the dyDesc descriptor .
dxDesc
TensorDescriptor
Handle to a previously initialized tensor descriptor.
Handle to a previously initialized tensor descriptor .
dx
CudaDeviceVariable<float>
Pointer to data of the tensor described by the dxDesc descriptor.
Pointer to data of the tensor described by the dxDesc descriptor .
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 .