3D input size to LSTM

Hi Everyone,

I am new to using LSTMs. I have the following requirements:

Input to lstm: [30, 16, 2]
Output from lstm: [256, 1]

Currently, as per the documentation, the input can be of a specific length, say n. That is one dimensional. How to have a 3d input?

E.g. ( batch size , sequence length , input dimension ) : I want the “Input dimension” as [30,16,2]

Also, in this case, what exactly is the “Sequence length”?


Try using x = x.view(1, 30, 2) LSTM input (seq_lenght, batch, input_size). Gd Luck