question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Two comments in lstm.py seem to be incorrect

See original GitHub issue

This issue is in the file lstm.py https://github.com/pytorch/fairseq/blob/master/fairseq/models/lstm.py

Seems to me that the comment # x: bsz x output_embed_dim in line 286 should be changed to # x: bsz x source_embed_dim because in Line 279 self.input_proj = Linear(input_embed_dim, source_embed_dim, bias=bias) the Linear layer converts input_embed_dim to source_embed_dim

If the comment on Line 286 is changed then it seems that the comment on Line 284 # source_hids: srclen x bsz x output_embed_dim should be changed to # source_hids: srclen x bsz x source_embed_dim

Question: Is output_embed_dim equal to source_embed_dim

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vineetk1commented, Sep 26, 2019

PR submitted.

0reactions
lematt1991commented, Sep 26, 2019

Resolved with #1185. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

TF LSTM multiple step predict seems to be wrong
Some comments on your training and model: 1) You specifically trained an LSTM to predict one value into the future from 20 past...
Read more >
Help: 'Wrong number of dimensions: expected 3, got 2 with ...
i am trying to discover an algorithm for iterative forecast using LSTM. seems to be something wrong with the code. would you be...
Read more >
Time Series Prediction with LSTM Recurrent Neural ...
Reported RMSEs were just plain wrong. Now, RMSE is calculated directly from predictions, and both RMSE and graphs of predictions are in the ......
Read more >
LSTM Neural Network for Time Series Prediction
The result (in case you've never seen a series of sin waves in your ... model.add(LSTM( layers[2], return_sequences=False)) ... lstm.py file.
Read more >
Text classification with an RNN
Keras recurrent layers have two available modes that are controlled by the return_sequences constructor argument: If False it returns only the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found