Please do not tag people like that, we read the forum…
You litterally have in your code lstm_output, self.hidden = self.lstm(embeds.view(len(sentence), 1, -1), self.hidden) -> embeds.view(len(sentence), 1, -1) so I don’t see any problem with this giving you 1 on the second dimension.