Could you print the shapes of the tensors yielding this error?
To get rid of this error, you could specify drop_last=True in your DataLoader for now.
I guess the last batch might have a single sample which might get squeezed somewhere, so that a size mismatch occurs.