C# Class ManagedCuda.CudaDNN.RNNDescriptor

Inheritance: IDisposable
Exibir arquivo Open project: kunzmi/managedCuda

Public Methods

Method Description
Dispose ( ) : void

Dispose

GetRNNLinLayerBiasParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerBiasDesc, CudaDeviceVariable linLayerBias ) : void

This function is used to obtain a pointer and descriptor for the bias parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.

GetRNNLinLayerBiasParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerBiasDesc, CudaDeviceVariable linLayerBias ) : void

This function is used to obtain a pointer and descriptor for the bias parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.

GetRNNLinLayerMatrixParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerMatDesc, CudaDeviceVariable linLayerMat ) : void

This function is used to obtain a pointer and descriptor for the matrix parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.

GetRNNLinLayerMatrixParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerMatDesc, CudaDeviceVariable linLayerMat ) : void

This function is used to obtain a pointer and descriptor for the matrix parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.

GetRNNTrainingReserveSize ( TensorDescriptor xDesc, ManagedCuda.BasicTypes.SizeT &sizeInBytes ) : void

This function is used to query the amount of reserved space required for training the RNN described by rnnDesc with inputs dimensions defined by xDesc. The same reserve space must be passed to cudnnRNNForwardTraining, cudnnRNNBackwardData and cudnnRNNBackwardWeights.

GetRNNWorkspaceSize ( TensorDescriptor xDesc, ManagedCuda.BasicTypes.SizeT &sizeInBytes ) : void

This function is used to query the amount of work space required to execute the RNN described by rnnDesc with inputs dimensions defined by xDesc.

RNNBackwardData ( TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor dyDesc, CudaDeviceVariable dy, TensorDescriptor dhyDesc, CudaDeviceVariable dhy, TensorDescriptor dcyDesc, CudaDeviceVariable dcy, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, TensorDescriptor dxDesc, CudaDeviceVariable dx, TensorDescriptor dhxDesc, CudaDeviceVariable dhx, TensorDescriptor dcxDesc, CudaDeviceVariable dcx, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void

This routine executes the recurrent neural network described by rnnDesc with output gradients dy, dhy, dhc, weights w and input gradients dx, dhx, dcx. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNForwardTraining. The same reserveSpace data must be used for future calls to cudnnRNNBackwardWeights if they execute on the same input data.

RNNBackwardData ( TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor dyDesc, CudaDeviceVariable dy, TensorDescriptor dhyDesc, CudaDeviceVariable dhy, TensorDescriptor dcyDesc, CudaDeviceVariable dcy, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, TensorDescriptor dxDesc, CudaDeviceVariable dx, TensorDescriptor dhxDesc, CudaDeviceVariable dhx, TensorDescriptor dcxDesc, CudaDeviceVariable dcx, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void

This routine executes the recurrent neural network described by rnnDesc with output gradients dy, dhy, dhc, weights w and input gradients dx, dhx, dcx. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNForwardTraining. The same reserveSpace data must be used for future calls to cudnnRNNBackwardWeights if they execute on the same input data.

RNNBackwardWeights ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor yDesc, CudaDeviceVariable y, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, FilterDescriptor dwDesc, CudaDeviceVariable dw, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void

This routine accumulates weight gradients dw from the recurrent neural network described by rnnDesc with inputs x, hx, and outputs y. The mode of operation in this case is additive, the weight gradients calculated will be added to those already existing in dw. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNBackwardData.

RNNBackwardWeights ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor yDesc, CudaDeviceVariable y, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, FilterDescriptor dwDesc, CudaDeviceVariable dw, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void

This routine accumulates weight gradients dw from the recurrent neural network described by rnnDesc with inputs x, hx, and outputs y. The mode of operation in this case is additive, the weight gradients calculated will be added to those already existing in dw. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNBackwardData.

RNNDescriptor ( ManagedCuda.CudaDNN.CudaDNNContext context ) : System

RNNForwardInference ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes ) : void

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. This function does not store data required for training; cudnnRNNForwardTraining should be used for that purpose.

RNNForwardInference ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes ) : void

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. This function does not store data required for training; cudnnRNNForwardTraining should be used for that purpose.

RNNForwardTraining ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. reserveSpace stores data required for training. The same reserveSpace data must be used for future calls to cudnnRNNBackwardData and cudnnRNNBackwardWeights if these execute on the same input data.

RNNForwardTraining ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. reserveSpace stores data required for training. The same reserveSpace data must be used for future calls to cudnnRNNBackwardData and cudnnRNNBackwardWeights if these execute on the same input data.

SetRNNDescriptor ( int hiddenSize, int seqLength, int numLayers, DropoutDescriptor dropoutDesc, cudnnRNNInputMode inputMode, cudnnDirectionMode direction, cudnnRNNMode mode, cudnnDataType dataType ) : void

This function initializes a previously created RNN descriptor object.

cudnnGetRNNParamsSize ( TensorDescriptor xDesc, ManagedCuda.BasicTypes.SizeT &sizeInBytes ) : void

This function is used to query the amount of parameter space required to execute the RNN described by rnnDesc with inputs dimensions defined by xDesc.

Protected Methods

Method Description
Dispose ( bool fDisposing ) : void

For IDisposable

Method Details

Dispose() public method

Dispose
public Dispose ( ) : void
return void

Dispose() protected method

For IDisposable
protected Dispose ( bool fDisposing ) : void
fDisposing bool
return void

GetRNNLinLayerBiasParams() public method

This function is used to obtain a pointer and descriptor for the bias parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
public GetRNNLinLayerBiasParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerBiasDesc, CudaDeviceVariable linLayerBias ) : void
layer int The layer to query.
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
linLayerID int /// The linear layer to obtain information about: /// * If mode in rnnDesc was set to CUDNN_RNN_RELU or CUDNN_RNN_TANH a value of 0 references /// the bias applied to the input from the previous layer, a value of 1 references the bias /// applied to the recurrent input. /// * If mode in rnnDesc was set to CUDNN_LSTM values of 0, 1, 2 and 3 reference bias applied to the input /// from the previous layer, value of 4, 5, 6 and 7 reference bias applied to the recurrent input. /// ‣ Values 0 and 4 reference the input gate. /// ‣ Values 1 and 5 reference the forget gate. /// ‣ Values 2 and 6 reference the new memory gate. /// ‣ Values 3 and 7 reference the output gate. /// * If mode in rnnDesc was set to CUDNN_GRU values of 0, 1 and 2 reference bias applied to the /// input from the previous layer, value of 3, 4 and 5 reference bias applied to the recurrent input. /// ‣ Values 0 and 3 reference the reset gate. /// ‣ Values 1 and 4 reference the update gate. /// ‣ Values 2 and 5 reference the new memory gate.
linLayerBiasDesc FilterDescriptor Handle to a previously created filter descriptor.
linLayerBias CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc.
return void

GetRNNLinLayerBiasParams() public method

This function is used to obtain a pointer and descriptor for the bias parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
public GetRNNLinLayerBiasParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerBiasDesc, CudaDeviceVariable linLayerBias ) : void
layer int The layer to query.
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
linLayerID int /// The linear layer to obtain information about: /// * If mode in rnnDesc was set to CUDNN_RNN_RELU or CUDNN_RNN_TANH a value of 0 references /// the bias applied to the input from the previous layer, a value of 1 references the bias /// applied to the recurrent input. /// * If mode in rnnDesc was set to CUDNN_LSTM values of 0, 1, 2 and 3 reference bias applied to the input /// from the previous layer, value of 4, 5, 6 and 7 reference bias applied to the recurrent input. /// ‣ Values 0 and 4 reference the input gate. /// ‣ Values 1 and 5 reference the forget gate. /// ‣ Values 2 and 6 reference the new memory gate. /// ‣ Values 3 and 7 reference the output gate. /// * If mode in rnnDesc was set to CUDNN_GRU values of 0, 1 and 2 reference bias applied to the /// input from the previous layer, value of 3, 4 and 5 reference bias applied to the recurrent input. /// ‣ Values 0 and 3 reference the reset gate. /// ‣ Values 1 and 4 reference the update gate. /// ‣ Values 2 and 5 reference the new memory gate.
linLayerBiasDesc FilterDescriptor Handle to a previously created filter descriptor.
linLayerBias CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc.
return void

GetRNNLinLayerMatrixParams() public method

This function is used to obtain a pointer and descriptor for the matrix parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
public GetRNNLinLayerMatrixParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerMatDesc, CudaDeviceVariable linLayerMat ) : void
layer int The layer to query.
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
linLayerID int /// The linear layer to obtain information about: /// * If mode in rnnDesc was set to CUDNN_RNN_RELU or CUDNN_RNN_TANH a value of 0 references the matrix multiplication /// applied to the input from the previous layer, a value of 1 references the matrix multiplication applied to the recurrent input. /// * If mode in rnnDesc was set to CUDNN_LSTM values of 0-3 reference matrix multiplications applied to the input from the /// previous layer, value of 4-7 reference matrix multiplications applied to the recurrent input. /// ‣ Values 0 and 4 reference the input gate. /// ‣ Values 1 and 5 reference the forget gate. /// ‣ Values 2 and 6 reference the new memory gate. /// ‣ Values 3 and 7 reference the output gate. /// * If mode in rnnDesc was set to CUDNN_GRU values of 0-2 reference matrix multiplications applied to the input /// from the previous layer, value of 3-5 reference matrix multiplications applied to the recurrent input. /// ‣ Values 0 and 3 reference the reset gate. /// ‣ Values 1 and 4 reference the update gate. /// ‣ Values 2 and 5 reference the new memory gate. ///
linLayerMatDesc FilterDescriptor Handle to a previously created filter descriptor.
linLayerMat CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc.
return void

GetRNNLinLayerMatrixParams() public method

This function is used to obtain a pointer and descriptor for the matrix parameters in layer within the RNN described by rnnDesc with inputs dimensions defined by xDesc.
public GetRNNLinLayerMatrixParams ( int layer, TensorDescriptor xDesc, FilterDescriptor wDesc, CudaDeviceVariable w, int linLayerID, FilterDescriptor linLayerMatDesc, CudaDeviceVariable linLayerMat ) : void
layer int The layer to query.
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
linLayerID int /// The linear layer to obtain information about: /// * If mode in rnnDesc was set to CUDNN_RNN_RELU or CUDNN_RNN_TANH a value of 0 references the matrix multiplication /// applied to the input from the previous layer, a value of 1 references the matrix multiplication applied to the recurrent input. /// * If mode in rnnDesc was set to CUDNN_LSTM values of 0-3 reference matrix multiplications applied to the input from the /// previous layer, value of 4-7 reference matrix multiplications applied to the recurrent input. /// ‣ Values 0 and 4 reference the input gate. /// ‣ Values 1 and 5 reference the forget gate. /// ‣ Values 2 and 6 reference the new memory gate. /// ‣ Values 3 and 7 reference the output gate. /// * If mode in rnnDesc was set to CUDNN_GRU values of 0-2 reference matrix multiplications applied to the input /// from the previous layer, value of 3-5 reference matrix multiplications applied to the recurrent input. /// ‣ Values 0 and 3 reference the reset gate. /// ‣ Values 1 and 4 reference the update gate. /// ‣ Values 2 and 5 reference the new memory gate. ///
linLayerMatDesc FilterDescriptor Handle to a previously created filter descriptor.
linLayerMat CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor linLayerMatDesc.
return void

GetRNNTrainingReserveSize() public method

This function is used to query the amount of reserved space required for training the RNN described by rnnDesc with inputs dimensions defined by xDesc. The same reserve space must be passed to cudnnRNNForwardTraining, cudnnRNNBackwardData and cudnnRNNBackwardWeights.
public GetRNNTrainingReserveSize ( TensorDescriptor xDesc, ManagedCuda.BasicTypes.SizeT &sizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration.
sizeInBytes ManagedCuda.BasicTypes.SizeT Minimum amount of GPU memory needed as reserve space to be able to train an RNN with the specified descriptor and input tensors.
return void

GetRNNWorkspaceSize() public method

This function is used to query the amount of work space required to execute the RNN described by rnnDesc with inputs dimensions defined by xDesc.
public GetRNNWorkspaceSize ( TensorDescriptor xDesc, ManagedCuda.BasicTypes.SizeT &sizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration.
sizeInBytes ManagedCuda.BasicTypes.SizeT Minimum amount of GPU memory needed as workspace to be able to execute an RNN with the specified descriptor and input tensors.
return void

RNNBackwardData() public method

This routine executes the recurrent neural network described by rnnDesc with output gradients dy, dhy, dhc, weights w and input gradients dx, dhx, dcx. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNForwardTraining. The same reserveSpace data must be used for future calls to cudnnRNNBackwardWeights if they execute on the same input data.
public RNNBackwardData ( TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor dyDesc, CudaDeviceVariable dy, TensorDescriptor dhyDesc, CudaDeviceVariable dhy, TensorDescriptor dcyDesc, CudaDeviceVariable dcy, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, TensorDescriptor dxDesc, CudaDeviceVariable dx, TensorDescriptor dhxDesc, CudaDeviceVariable dhx, TensorDescriptor dcxDesc, CudaDeviceVariable dcx, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void
yDesc TensorDescriptor An array of tensor descriptors describing the output from each /// recurrent iteration. The first dimension of the tensor depends on the direction /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the /// hiddenSize argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in dyDesc. /// The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc.
dyDesc TensorDescriptor An array of tensor descriptors describing the gradient at the output from each /// recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in dxDesc. The /// tensor must be fully packed.
dy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array dyDesc.
dhyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradients at the /// final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed /// to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
dhy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dhyDesc. If a NULL pointer /// is passed, the gradients at the final hidden state of the network will be initialized to zero.
dcyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradients at /// the final cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the /// second dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
dcy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dcyDesc. If a NULL pointer /// is passed, the gradients at the final cell state of the network will be initialized to zero.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be /// fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is /// passed, the initial hidden state of the network will be initialized to zero.
cxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the /// initial cell state for LSTM networks. The first dimension of the tensor must match the /// hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The /// second dimension must match the second dimension of the first tensor described in xDesc. The /// third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call /// used to initialize rnnDesc. The tensor must be fully packed.
cx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cxDesc. /// If a NULL pointer is passed, the initial cell state of the network will be initialized to zero.
dxDesc TensorDescriptor An array of tensor descriptors describing the gradient at the input of each recurrent iteration. /// Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from /// element n to element n+1 but may not increase. The tensor must be fully packed.
dx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array dxDesc.
dhxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradient at the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor /// call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. /// The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. /// The tensor must be fully packed.
dhx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dhxDesc. If a NULL pointer is passed, the /// gradient at the hidden input of the network will not be set.
dcxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradient /// at the initial cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed /// to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
dcx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dcxDesc. If /// a NULL pointer is passed, the gradient at the cell input of the network will not be set.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
reserveSpace CudaDeviceVariable Data pointer to GPU memory to be used as a reserve space for this call.
reserveSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided reserveSpace.
return void

RNNBackwardData() public method

This routine executes the recurrent neural network described by rnnDesc with output gradients dy, dhy, dhc, weights w and input gradients dx, dhx, dcx. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNForwardTraining. The same reserveSpace data must be used for future calls to cudnnRNNBackwardWeights if they execute on the same input data.
public RNNBackwardData ( TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor dyDesc, CudaDeviceVariable dy, TensorDescriptor dhyDesc, CudaDeviceVariable dhy, TensorDescriptor dcyDesc, CudaDeviceVariable dcy, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, TensorDescriptor dxDesc, CudaDeviceVariable dx, TensorDescriptor dhxDesc, CudaDeviceVariable dhx, TensorDescriptor dcxDesc, CudaDeviceVariable dcx, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void
yDesc TensorDescriptor An array of tensor descriptors describing the output from each /// recurrent iteration. The first dimension of the tensor depends on the direction /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the /// hiddenSize argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in dyDesc. /// The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc.
dyDesc TensorDescriptor An array of tensor descriptors describing the gradient at the output from each /// recurrent iteration. The first dimension of the tensor depends on the direction argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in dxDesc. The /// tensor must be fully packed.
dy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array dyDesc.
dhyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradients at the /// final hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed /// to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
dhy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dhyDesc. If a NULL pointer /// is passed, the gradients at the final hidden state of the network will be initialized to zero.
dcyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradients at /// the final cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the /// second dimension of the first tensor described in dyDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
dcy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dcyDesc. If a NULL pointer /// is passed, the gradients at the final cell state of the network will be initialized to zero.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be /// fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer is /// passed, the initial hidden state of the network will be initialized to zero.
cxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the /// initial cell state for LSTM networks. The first dimension of the tensor must match the /// hiddenSize argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The /// second dimension must match the second dimension of the first tensor described in xDesc. The /// third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call /// used to initialize rnnDesc. The tensor must be fully packed.
cx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cxDesc. /// If a NULL pointer is passed, the initial cell state of the network will be initialized to zero.
dxDesc TensorDescriptor An array of tensor descriptors describing the gradient at the input of each recurrent iteration. /// Each tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease from /// element n to element n+1 but may not increase. The tensor must be fully packed.
dx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array dxDesc.
dhxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradient at the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the cudnnSetRNNDescriptor /// call used to initialize rnnDesc. The second dimension must match the second dimension of the first tensor described in xDesc. /// The third dimension must match the numLayers argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. /// The tensor must be fully packed.
dhx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dhxDesc. If a NULL pointer is passed, the /// gradient at the hidden input of the network will not be set.
dcxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the gradient /// at the initial cell state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed /// to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
dcx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor dcxDesc. If /// a NULL pointer is passed, the gradient at the cell input of the network will not be set.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
reserveSpace CudaDeviceVariable Data pointer to GPU memory to be used as a reserve space for this call.
reserveSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided reserveSpace.
return void

RNNBackwardWeights() public method

This routine accumulates weight gradients dw from the recurrent neural network described by rnnDesc with inputs x, hx, and outputs y. The mode of operation in this case is additive, the weight gradients calculated will be added to those already existing in dw. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNBackwardData.
public RNNBackwardWeights ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor yDesc, CudaDeviceVariable y, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, FilterDescriptor dwDesc, CudaDeviceVariable dw, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration. /// Each tensor descriptor must have the same first dimension. The second dimension of the tensors may /// decrease from element n to element n+1 but may not increase. The tensor must be fully packed.
x CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array xDesc.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to /// the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If /// a NULL pointer is passed, the initial hidden state of the network will be initialized to zero.
yDesc TensorDescriptor An array of tensor descriptors describing the output from each /// recurrent iteration. The first dimension of the tensor depends on the direction /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in dyDesc. /// The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
dwDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the gradients of the weights for the RNN.
dw CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor dwDesc.
reserveSpace CudaDeviceVariable Data pointer to GPU memory to be used as a reserve space for this call.
reserveSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided reserveSpace.
return void

RNNBackwardWeights() public method

This routine accumulates weight gradients dw from the recurrent neural network described by rnnDesc with inputs x, hx, and outputs y. The mode of operation in this case is additive, the weight gradients calculated will be added to those already existing in dw. workspace is required for intermediate storage. The data in reserveSpace must have previously been generated by cudnnRNNBackwardData.
public RNNBackwardWeights ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor yDesc, CudaDeviceVariable y, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, FilterDescriptor dwDesc, CudaDeviceVariable dw, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration. /// Each tensor descriptor must have the same first dimension. The second dimension of the tensors may /// decrease from element n to element n+1 but may not increase. The tensor must be fully packed.
x CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array xDesc.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to /// the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If /// a NULL pointer is passed, the initial hidden state of the network will be initialized to zero.
yDesc TensorDescriptor An array of tensor descriptors describing the output from each /// recurrent iteration. The first dimension of the tensor depends on the direction /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in dyDesc. /// The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
dwDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the gradients of the weights for the RNN.
dw CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor dwDesc.
reserveSpace CudaDeviceVariable Data pointer to GPU memory to be used as a reserve space for this call.
reserveSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided reserveSpace.
return void

RNNDescriptor() public method

public RNNDescriptor ( ManagedCuda.CudaDNN.CudaDNNContext context ) : System
context ManagedCuda.CudaDNN.CudaDNNContext
return System

RNNForwardInference() public method

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. This function does not store data required for training; cudnnRNNForwardTraining should be used for that purpose.
public RNNForwardInference ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration. /// Each tensor descriptor must have the same first dimension. The second dimension of the tensors may /// decrease from element n to element n+1 but may not increase. The tensor must be fully packed.
x CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. /// The data are expected to be packed contiguously with the first element of iteration n+1 following /// directly from the last element of iteration n.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be /// fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer /// is passed, the initial hidden state of the network will be initialized to zero.
cxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial cell /// state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to /// the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
cx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL /// pointer is passed, the initial cell state of the network will be initialized to zero.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
yDesc TensorDescriptor An array of tensor descriptors describing the output from each recurrent iteration. /// The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor /// call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in xDesc. /// The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc. The data /// are expected to be packed contiguously with the first element of iteration n+1 following directly /// from the last element of iteration n.
hyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be /// fully packed.
hy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a NULL /// pointer is passed, the final hidden state of the network will not be saved.
cyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final cell /// state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed /// to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
cy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cyDesc. If /// a NULL pointer is passed, the final cell state of the network will be not be saved.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
return void

RNNForwardInference() public method

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. This function does not store data required for training; cudnnRNNForwardTraining should be used for that purpose.
public RNNForwardInference ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration. /// Each tensor descriptor must have the same first dimension. The second dimension of the tensors may /// decrease from element n to element n+1 but may not increase. The tensor must be fully packed.
x CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array xDesc. /// The data are expected to be packed contiguously with the first element of iteration n+1 following /// directly from the last element of iteration n.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be /// fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer /// is passed, the initial hidden state of the network will be initialized to zero.
cxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial cell /// state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to /// the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
cx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL /// pointer is passed, the initial cell state of the network will be initialized to zero.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
yDesc TensorDescriptor An array of tensor descriptors describing the output from each recurrent iteration. /// The first dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor /// call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor n in xDesc. /// The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc. The data /// are expected to be packed contiguously with the first element of iteration n+1 following directly /// from the last element of iteration n.
hyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final hidden /// state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be /// fully packed.
hy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a NULL /// pointer is passed, the final hidden state of the network will not be saved.
cyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final cell /// state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed /// to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
cy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cyDesc. If /// a NULL pointer is passed, the final cell state of the network will be not be saved.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
return void

RNNForwardTraining() public method

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. reserveSpace stores data required for training. The same reserveSpace data must be used for future calls to cudnnRNNBackwardData and cudnnRNNBackwardWeights if these execute on the same input data.
public RNNForwardTraining ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration. Each /// tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease /// from element n to element n+1 but may not increase. The tensor must be fully packed.
x CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array xDesc.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden state /// of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer /// is passed, the initial hidden state of the network will be initialized to zero.
cxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial /// cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match /// the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully /// packed.
cx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is /// passed, the initial cell state of the network will be initialized to zero.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
yDesc TensorDescriptor An array of tensor descriptors describing the output from each recurrent iteration. The first /// dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor /// call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor /// n in xDesc. The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc.
hyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final /// hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
hy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a /// NULL pointer is passed, the final hidden state of the network will not be saved.
cyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final cell state /// for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
cy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cyDesc. If a NULL pointer is /// passed, the final cell state of the network will be not be saved.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
reserveSpace CudaDeviceVariable Data pointer to GPU memory to be used as a reserve space for this call.
reserveSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided reserveSpace.
return void

RNNForwardTraining() public method

This routine executes the recurrent neural network described by rnnDesc with inputs x, hx, cx, weights w and outputs y, hy, cy. workspace is required for intermediate storage. reserveSpace stores data required for training. The same reserveSpace data must be used for future calls to cudnnRNNBackwardData and cudnnRNNBackwardWeights if these execute on the same input data.
public RNNForwardTraining ( TensorDescriptor xDesc, CudaDeviceVariable x, TensorDescriptor hxDesc, CudaDeviceVariable hx, TensorDescriptor cxDesc, CudaDeviceVariable cx, FilterDescriptor wDesc, CudaDeviceVariable w, TensorDescriptor yDesc, CudaDeviceVariable y, TensorDescriptor hyDesc, CudaDeviceVariable hy, TensorDescriptor cyDesc, CudaDeviceVariable cy, CudaDeviceVariable workspace, ManagedCuda.BasicTypes.SizeT workSpaceSizeInBytes, CudaDeviceVariable reserveSpace, ManagedCuda.BasicTypes.SizeT reserveSpaceSizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration. Each /// tensor descriptor must have the same first dimension. The second dimension of the tensors may decrease /// from element n to element n+1 but may not increase. The tensor must be fully packed.
x CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptors in the array xDesc.
hxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial hidden state /// of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second /// dimension of the first tensor described in xDesc. The third dimension must match the numLayers argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
hx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hxDesc. If a NULL pointer /// is passed, the initial hidden state of the network will be initialized to zero.
cxDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the initial /// cell state for LSTM networks. The first dimension of the tensor must match the hiddenSize argument /// passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match /// the second dimension of the first tensor described in xDesc. The third dimension must match the numLayers /// argument passed to the cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully /// packed.
cx CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cxDesc. If a NULL pointer is /// passed, the initial cell state of the network will be initialized to zero.
wDesc FilterDescriptor Handle to a previously initialized filter descriptor describing the weights for the RNN.
w CudaDeviceVariable Data pointer to GPU memory associated with the filter descriptor wDesc.
yDesc TensorDescriptor An array of tensor descriptors describing the output from each recurrent iteration. The first /// dimension of the tensor depends on the direction argument passed to the cudnnSetRNNDescriptor /// call used to initialize rnnDesc: /// * If direction is CUDNN_UNIDIRECTIONAL the first dimension should match the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// * If direction is CUDNN_BIDIRECTIONAL the first dimension should match double the hiddenSize /// argument passed to cudnnSetRNNDescriptor. /// The second dimension of the tensor n must match the second dimension of the tensor /// n in xDesc. The tensor must be fully packed.
y CudaDeviceVariable Data pointer to GPU memory associated with the output tensor descriptor yDesc.
hyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final /// hidden state of the RNN. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
hy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor hyDesc. If a /// NULL pointer is passed, the final hidden state of the network will not be saved.
cyDesc TensorDescriptor Handle to a previously initialized tensor descriptor describing the final cell state /// for LSTM networks. The first dimension of the tensor must match the hiddenSize argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The second dimension must match the second dimension /// of the first tensor described in xDesc. The third dimension must match the numLayers argument passed to the /// cudnnSetRNNDescriptor call used to initialize rnnDesc. The tensor must be fully packed.
cy CudaDeviceVariable Data pointer to GPU memory associated with the tensor descriptor cyDesc. If a NULL pointer is /// passed, the final cell state of the network will be not be saved.
workspace CudaDeviceVariable Data pointer to GPU memory to be used as a workspace for this call.
workSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided workspace.
reserveSpace CudaDeviceVariable Data pointer to GPU memory to be used as a reserve space for this call.
reserveSpaceSizeInBytes ManagedCuda.BasicTypes.SizeT Specifies the size in bytes of the provided reserveSpace.
return void

SetRNNDescriptor() public method

This function initializes a previously created RNN descriptor object.
public SetRNNDescriptor ( int hiddenSize, int seqLength, int numLayers, DropoutDescriptor dropoutDesc, cudnnRNNInputMode inputMode, cudnnDirectionMode direction, cudnnRNNMode mode, cudnnDataType dataType ) : void
hiddenSize int Size of the internal hidden state for each layer.
seqLength int Number of iterations to unroll over.
numLayers int Number of layers.
dropoutDesc DropoutDescriptor Handle to a previously created and initialized dropout descriptor.
inputMode cudnnRNNInputMode Specifies the behavior at the input to the first layer.
direction cudnnDirectionMode Specifies the recurrence pattern. (eg. bidirectional)
mode cudnnRNNMode The type of RNN to compute.
dataType cudnnDataType Math precision.
return void

cudnnGetRNNParamsSize() public method

This function is used to query the amount of parameter space required to execute the RNN described by rnnDesc with inputs dimensions defined by xDesc.
public cudnnGetRNNParamsSize ( TensorDescriptor xDesc, ManagedCuda.BasicTypes.SizeT &sizeInBytes ) : void
xDesc TensorDescriptor An array of tensor descriptors describing the input to each recurrent iteration
sizeInBytes ManagedCuda.BasicTypes.SizeT Minimum amount of GPU memory needed as parameter space to be able to execute an RNN with the specified descriptor and input tensors.
return void