code: public static int cudnnCTCLoss(
          cudnnHandle handle, 
          cudnnTensorDescriptor probsDesc, /** 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)  */
          Pointer probs, /** probabilities after softmax, in GPU memory */
          int[] labels, /** labels, in CPU memory */
          int[] labelLengths, /** the length of each label, in CPU memory */
          int[] inputLengths, /** the lengths of timing steps in each batch, in CPU memory */
          Pointer costs, /** the returned costs of CTC, in GPU memory */
          cudnnTensorDescriptor gradientsDesc, /** Tensor descriptor for gradients, the dimensions are T,N,A */
          Pointer gradients, /** the returned CTC gradients, in GPU memory, to compute costs only, set it to NULL */
          int algo, /** algorithm selected, supported now 0 and 1 */
          cudnnCTCLossDescriptor ctcLossDesc, 
          Pointer workspace, /** pointer to the workspace, in GPU memory */
          long workSpaceSizeInBytes)/** the workspace size needed */
      {
          return checkResult(cudnnCTCLossNative(handle, probsDesc, probs, labels, labelLengths, inputLengths, costs, gradientsDesc, gradients, algo, ctcLossDesc, workspace, workSpaceSizeInBytes));
      }
docs: return the ctc costs and gradients, given the probabilities and labels