I’m trying to use cross entropy loss on sequential batched data.
I have a many to many language model.
My nets output size is torch.Size([20, 54, 9999]), and the labels are torch.Size([20, 54]).
Batch size is 20, Sentence Length is 54 and vocab 9999.
When trying to pass this to cross entropy it passes the net output as (20, 9999) and therefore expects the target also to be of this size.
How can I use cross entropy loss in this case?