I have my logits of shape (16, 100, 1024), where 16 is batch size, 100 is sequence length, and 1024 is feature length.
My target is of shape (16, 100), where 16 is batch size and 100 is sequence length
while applying nn.CrossEntropyLoss on the both i get the following error
#ValueError: Expected target size (16, 1024), got torch.Size([16, 100])
wheres this is working with this snipped
what am i doing wrong?