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

Maybe a bug: data leak in decoder when bidirectional == True #22

Open
linzeqipku opened this issue Jul 3, 2020 · 1 comment
Open

Maybe a bug: data leak in decoder when bidirectional == True #22

linzeqipku opened this issue Jul 3, 2020 · 1 comment

Comments

@linzeqipku
Copy link

Model.py, Line 41:
self.decoder_rnn = rnn(embedding_size, hidden_size, num_layers=num_layers, bidirectional=self.bidirectional, batch_first=True)

If bidirectional == True:
When the decoder is decoding the t-th token, it can obtain information from the whole input sentence.

I think this may be a bug, and I'd appreciate that if you can help double-check this. Many thanks.

@timbmg
Copy link
Owner

timbmg commented Jan 26, 2021

Yes that is correct, so bidirectional should not be used in the decoder. Would you like to make a PR for this?

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

No branches or pull requests

2 participants