Hi guys,

I’m stuck, I really need your help.

I am trying to run this step:

rnn(X, self.hidden)

self.hidden size is [self.n_layers, self.batch_size, self.n_neurons], which is 1x100x15 in my case

X.shape is (100,16) initially, where 100 is batch size and 16 is number of features

To make it work I transform X with X = X.unsqueeze(dim=0) , so that I have shape of X now - (1,100,16).

First question-is it right thing to do? It works, but I don’t understand why…

The second question is that I want to make number of layers equal to 2,

so self.hidden size is now [2x100x15], but how should I transform X?

It gives me error now:

RuntimeError: Expected hidden size (1, 100, 15), got (2, 100, 15)

Thank you very uch in advance!!!