Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gru/lstm: Fix missing/incorrect variables and options use #655

Merged

Conversation

inexorabletash
Copy link
Member

@inexorabletash inexorabletash commented Apr 24, 2024

  • In gru(), batchSize and numDirections were used without being defined. Define them.

  • In lstm(), numDirections was initialized to 2 if the direction was "backward", should be 1.

  • In gru() and gruCell(), options.activations was unconditionally added to the operator. Make this conditional.

  • In lstm() and lstmCell(), options.activations were not added to the operator. Add if given.


Preview | Diff

- In gru(), batchSize and numDirections were used without being
  defined. Define them.

- In lstm(), numDirections was initialized to 2 if the direction was
  "backward", should be 1.

- In gru() and gruCell(), options.activations was unconditionally
  added to the operator. Make this conditional.

- In lstm() and lstmCell(), options.activations were not added to the
  operator. Add if given.
@inexorabletash
Copy link
Member Author

Straightforward fixes noticed while working on other PRs. Please take a look?

Copy link
Collaborator

@fdwr fdwr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@inexorabletash
Copy link
Member Author

@huningxin - can you review and merge if it looks good? Thanks!

Copy link
Contributor

@huningxin huningxin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@huningxin huningxin merged commit 0df0296 into webmachinelearning:main Apr 24, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Apr 24, 2024
SHA: 0df0296
Reason: push, by huningxin

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@inexorabletash inexorabletash deleted the bugfix-lstm-gru-variables branch April 25, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants