RuntimeError: multi-target not supported at /pytorch/aten/src/THCUNN/generic/

Hello, I am working on multi-shot Person Re-id. my X_Train.shape is 432, 22 ,6,128,64, where 432 is total number of sequences(300 classes), 22 is sequence length, 6 channels, 128 Height and 64 width, and my Y_Train.shape is 432,22,1.
The output from my fully connected layer is 22,300, this error arises when i pass the data to loss function nn.CrossEntropyLoss().
I am new to PyTorch please help me.