The docs to suggest using of logarithmized probabilities for an input of CTCLoss
https://pytorch.org/docs/stable/generated/torch.nn.CTCLoss.html#torch.nn.CTCLoss 6
However, there is example in pytorch repo (the DeepSpeech model) where softmax func (instead of log_softmax) is used just for evaluation but not training.
  
      github.com
  
  
    pytorch/pytorch/blob/22a34bcf4e5eaa348f0117c414c3dd760ec64b13/benchmarks/functional_autograd_benchmark/torchaudio_models.py#L135-L140

class InferenceBatchSoftmax(nn.Module):    def forward(self, input_):        if not self.training:            return F.softmax(input_, dim=-1)        else:            return input_



  
  
    
    
  
  


So I want to clarify what should I use for training and evaluation in CTCLoss:


softmax/log_softmax for train/eval?
identity for the training and softmax/log_softmax for eval like in example I shared above?