-
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
SGU and DSGU #1115
SGU and DSGU #1115
Conversation
This comment about MGU is true of SGU and DSGU, too. |
def set_state(self, h): | ||
assert isinstance(h, chainer.Variable) | ||
h_ = h | ||
if self.xp == numpy: |
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.
Use is
to compare modules.
return h_t | ||
|
||
|
||
class StatefulSGU(SGU): |
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.
I think stateful RNN should not be a derived class of stateless one because if x
is an instance of StatefulGRU
, isinstance(x, SGU)
equals to True
, which is counterintuitive.
Actually, existing RNN units, use base class like LSTMBase
and GRUBase
. Both stateful and stateless RNNs derive this base class.
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.
@unnonouno Could you consider it again?
Same as #1101. How about adding the prefix |
Could rename |
Also, could you resolve the conflict? |
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. |
Is it OK to abandon this PR? |
@unnonouno How do you think of it? I don't think it takes too much time to write it up. If you cannot spare time to work on this, somebody could take it over. |
I implemented SGU and DSGU.
http://arxiv.org/abs/1604.02910