ctc_loss

dragon.vm.torch.nn.functional.ctc_loss(
  input,
  target,
  padding_mask=- 1,
  reduction='mean'
)[source]

Compute the ctc loss. [Graves & Gomez, 2006].

Parameters:
  • input (dragon.vm.torch.Tensor) The input tensor.
  • target (dragon.vm.torch.Tensor) The target tensor.
  • padding_mask (int, optional, default=-1) The mask for padding the redundant labels.
  • reduction ({'none', 'mean', 'sum'}, optional) The reduce method.
Returns:

dragon.vm.torch.Tensor The loss.