Sentence-VAE icon indicating copy to clipboard operation
Sentence-VAE copied to clipboard

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

Open linzeqipku opened this issue 5 years ago • 1 comments

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.

linzeqipku avatar Jul 03 '20 13:07 linzeqipku

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

timbmg avatar Jan 26 '21 15:01 timbmg