Same problem for me ‘nn.Embedding’ not working
no_layers = 3
vocab_size = padded_rev.shape[0] + 1 #extra 1 for padding
embedding_dim = 400
output_dim = 1
hidden_dim = 256
train_on_gpu = False

model = SentimentRNN(no_layers,seq_length,embedding_dim,hidden_dim,drop_prob=0.5,
                 train_on_gpu=train_on_gpu)
print(model)


SentimentRNN(
  (embedding): Embedding(49975, 400)
  (lstm): LSTM(400, 256, num_layers=3, batch_first=True, dropout=0.5)
  (dropout): Dropout(p=0.3, inplace=False)
  (fc): Linear(in_features=256, out_features=1, bias=True)
  (sig): Sigmoid()
)


Unable to train model.It is giving index error.