Many to many RNN training problem

I am experimenting with a bag of words model with a vocabulary of 35000 words. So, my input is of the size torch.Size([2, 1, 35165, 106]) and the label (a.k.a target) is of the size torch.Size([2, 1, 17, 106]). I am using a RNN unit but facing some errors while calculating the loss using crossentropyloss. I have converted the labels into the specified form required by crossentropyloss by using argmax.

This is the error that is being thrown:

This is the model.