Thanks for your reply. I printed the shape and found the following.
embedded = self.embedding(input).view(1, 1, -1)
embedded = self.drop(embedded)
print(embedded[0].size(), hidden[0].size())

I am getting, torch.size([1, 300]) torch.size([1, 1, 300]). Why I am getting [1, 300] shape for embedded tensor even though I have used the view method as view(1, 1, -1)?