Library/ManagedCuda/CudaDNN/CudaDNNNativeMethods.cs
/// <summary>
/// return the workspace size needed for ctc
/// </summary>
/// <param name="handle"></param>
/// <param name="probsDesc"></param>
/// <param name="gradientsDesc"></param>
/// <param name="labels"></param>
/// <param name="labelLengths"></param>
/// <param name="inputLengths"></param>
/// <param name="algo"></param>
/// <param name="ctcLossDesc"></param>
/// <param name="sizeInBytes"></param>
/// <returns></returns>
return the workspace size needed for ctc
return the workspace size needed for ctc
[DllImport(CUDNN_API_DLL_NAME)]
        public static extern cudnnStatus cudnnGetCTCLossWorkspaceSize(
                                cudnnHandle handle,
                                cudnnTensorDescriptor probsDesc,       
                                cudnnTensorDescriptor gradientsDesc,   
                                int[] labels,         
                                int[] labelLengths,   
                                int[] inputLengths,   
                                cudnnCTCLossAlgo                  algo,            
                                cudnnCTCLossDescriptor ctcLossDesc,
                                ref SizeT sizeInBytes );
[ DllImport ( CUDNN_API_DLL_NAME ) ] public static extern cudnnStatus cudnnGetCTCLossWorkspaceSize ( cudnnHandle handle , cudnnTensorDescriptor probsDesc , cudnnTensorDescriptor gradientsDesc , int [ ] labels , int [ ] labelLengths , int [ ] inputLengths , cudnnCTCLossAlgo algo , cudnnCTCLossDescriptor ctcLossDesc , ref SizeT sizeInBytes ) ;
return the workspace size needed for ctc
return the workspace size needed for ctc
/* Tensor descriptor for probabilities, the dimensions are T,N,A (T is the timing steps, N is the mini batch size, A is the alphabet size) */ /* Tensor descriptor for gradients, the dimensions are T,N,A. To compute costs only, set it to NULL */ /* labels, in CPU memory */ /* the length of each label, in CPU memory */ /* the lengths of timing steps in each batch, in CPU memory */ /* algorithm selected, supported now 0 and 1 */
None
handle
cudnnHandle
None
probsDesc
cudnnTensorDescriptor
None
gradientsDesc
cudnnTensorDescriptor
None
labels
int[]
None
labelLengths
int[]
None
inputLengths
int[]
None
algo
cudnnCTCLossAlgo
None
ctcLossDesc
cudnnCTCLossDescriptor
None
SizeT
ref
sizeInBytes
None