-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix for issue #6521 and issue #6810 #6808
Conversation
This PR fixes the issue raised in issue #6521 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. LGTM
Do you want the example to be reviewed in this PR? If no, could you resend a PR from a new branch pointing 0632fe0? |
yeah I am fine with it |
since I am adding this PR as part of my GSoC proposal, I will create a new issue for referencing the example part. |
>>> import chainer | ||
>>> from chainer import Variable | ||
>>> from chainer import links as L | ||
>>> import numpy as np |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imports are done here.
>>> [x.shape for x in xs] | ||
[(4, 2), (4, 2), (4, 2), (4, 2), (4, 2)] | ||
>>> lstm = L.NStepLSTM(n_layers, in_size, out_size, dropout_ratio) | ||
>>> hy, cy, ys = lstm(None, None, xs) # passing no hidden or cell state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The style requires two space before #
that starts a comment
>>> hy, cy, ys = lstm(None, None, xs) # passing no hidden or cell state | |
>>> hy, cy, ys = lstm(None, None, xs) # passing no hidden or cell state |
>>> batch = 5 | ||
>>> xs = [Variable(np.random.rand(seq_len, in_size)) for i in range(batch)] | ||
>>> [x.shape for x in xs] | ||
[(4, 2), (4, 2), (4, 2), (4, 2), (4, 2)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would present general usage to give xs
with different sequence lengths.
@euler16 Can you look at the review? |
Euler, can you revise this? |
@euler16, it would be great if you could revise. We'd like to reflect these changes, so if we don't hear from you within a week or so, we'll take over this PR to complete it. Thanks, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs. Thank you for your contributions. |
This issue is closed as announced. Feel free to re-open it if needed. |
Thank you for creating a pull request!
Please double-check the following.