IBM / pytorch-seq2seq

An open source framework for seq2seq models in PyTorch.
https://ibm.github.io/pytorch-seq2seq/public/index.html
Apache License 2.0
1.5k stars 376 forks source link

Fix hidden size when bidirectional is set to False #184

Closed amjltc295 closed 5 years ago

amjltc295 commented 5 years ago

Why

When bidirectional is set to false, the hidden size of the decoder is set to be 1 and it causes RuntimeError: Expected hidden size (1, 16, 1), got (1, 16, 256)

How

Change it to hidden_size, the same as encoder

amjltc295 commented 5 years ago

@pskrunner14 fixed it to the required format.