docstr: log_probs: Tensor of (batch x seqLength x labelLength x outputDim) containing output from network
  labels: 2 dimensional Tensor containing all the targets of the batch with zero padded
  act_lens: Tensor of size (batch) containing size of each output sequence from the network
  label_lens: Tensor of (batch) containing label length of each example
  fastemit_lambda: Float scaling factor for FastEmit regularization. Refer to
      FastEmit: Low-latency Streaming ASR with Sequence-level Emission Regularization.
docstr_tok: ["log_probs",":","Tensor","of","(","batch","x","seqLength","x","labelLength","x","outputDim",")","containing","output","from","network","labels",":","2","dimensional","Tensor","containing","all","the","targets","of","the","batch","with","zero","padded","act_lens",":","Tensor","of","size","(","batch",")","containing","size","of","each","output","sequence","from","the","network","label_lens",":","Tensor","of","(","batch",")","containing","label","length","of","each","example","fastemit_lambda",":","Float","scaling","factor","for","FastEmit","regularization",".","Refer","to","FastEmit",":","Low-latency","Streaming","ASR","with","Sequence-level","Emission","Regularization","."]
code: def forward(
      ctx,
      acts,
      labels,
      act_lens,
      label_lens,
      blank,
      reduction,
      fastemit_lambda,
      clamp,
  ):
      """
      log_probs: Tensor of (batch x seqLength x labelLength x outputDim) containing output from network
      labels: 2 dimensional Tensor containing all the targets of the batch with zero padded
      act_lens: Tensor of size (batch) containing size of each output sequence from the network
      label_lens: Tensor of (batch) containing label length of each example
      fastemit_lambda: Float scaling factor for FastEmit regularization. Refer to
          FastEmit: Low-latency Streaming ASR with Sequence-level Emission Regularization.
      """
      is_cuda = acts.is_cuda
  
      certify_inputs(acts, labels, act_lens, label_lens)
      if clamp < 0:
          raise ValueError(
              "`clamp` must be 0.0 or positive float value."
          )
  
      loss_func = rnnt.rnnt_loss_gpu if is_cuda else rnnt.rnnt_loss_cpu
      grads = torch.zeros_like(acts) if acts.requires_grad else None
      minibatch_size = acts.size(0)
      costs = torch.zeros(
          minibatch_size, device=acts.device, dtype=torch.float32
      )
  
      loss_func(
          acts,
          labels=labels,
          input_lengths=act_lens,
          label_lengths=label_lens,
          costs=costs,
          grads=grads,
          blank_label=blank,
          fastemit_lambda=fastemit_lambda,
          clamp=clamp,
          num_threads=0,
      )
  
      if reduction in ["sum", "mean"]:
          costs = costs.sum().unsqueeze_(-1)
          if reduction == "mean":
              costs /= minibatch_size
  
              if grads is not None:
                  grads /= minibatch_size
  
      ctx.grads = grads
  
      return costs
  
imports: import torch
  from torch.autograd import Function
  from torch.nn import Module
  from nemo.collections.asr.parts.numba.rnnt_loss import rnnt
  from nemo.collections.asr.parts.numba.rnnt_loss.utils.cpu_utils import cpu_rnnt
label_desc: Use image node_id 1 for calling the _RNNTNumba obj's underlying member method code with example usage: obj.forward(ctx, acts, labels, act_lens, label_lens, blank, reduction, fastemit_lambda, clamp) and returns: costs