Hi,
I have implemented a CRNN model based on the paper. I have used CTC loss implemented in Pytorch and the model was working fine with one dataset. However, when I changed the dataset it produced nan loss. To avoid that I tried setting zero_infinity=True. Then the backward function produces the following error.
RuntimeError: The size of tensor a (0) must match the size of tensor b (93) at non-singleton dimension 2
This happens with both datasets. Does zero_infinity change the shape of tensors? ('m doing some tensor transformations within the model to map CNN output to LSTM input) Can someone point to me what I’m doing incorrectly here?
Thanks.