ValueError: Expected target size (128, 44), got torch.Size([128, 100]), LSTM Pytorch
问题 I want to build a model, that predicts next character based on the previous characters. I have spliced text into sequences of integers with length = 100(using dataset and dataloader). Dimensions of my input and target variables are: inputs dimension: (batch_size,sequence length). In my case (128,100) targets dimension: (batch_size,sequence length). In my case (128,100) After forward pass I get dimension of my predictions: (batch_size, sequence_length, vocabulary_size) which is in my case (128