ChiWeiHsiao / DeepVO-pytorch

PyTorch Implementation of DeepVO

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The call of LSTM may be different from official documentation of Pytorch

chaoxianluo opened this issue · comments

Hello, I have cloned your code and run successfully using trained model you provide. I got resonable results. However I noticed that the call of LSTM in your implentation is different from what offical documentation says.
According to official documentation, the input of LSTM should be of shape (seq_len, batch, input_size), however in your code, it's of shape (batch_size, seq_len, input_size).
I wonder whether I referenced documentation with mismatched version or there may be some error in your code.
Thanks for the share of your implementation.

ref documentation: https://pytorch.org/docs/master/generated/torch.nn.LSTM.html

Hello,

As you can see in the documentation, in the list of arguments there is "batch_first". That explains it.

Hello,

As you can see in the documentation, in the list of arguments there is "batch_first". That explains it.

OK, I notice it, thank you very much!