The output variable has to be a probability vector. Are you applying the logsoftmax on outputs variable before pushing it into the CTCLoss function? Additionally, can you print out the CTC_Criterion function?