Runtime error: target_lengths must be of size batch_size with CTC loss using a batch size of 1

I was passing log probs as a tensor of shape [batch_size, sequence_length, features], while the CTC loss expects the batch size on the second dimension.

1 Like