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

a problem about Mem2Seq.py #8

Closed
bing-95 opened this issue Nov 29, 2018 · 2 comments
Closed

a problem about Mem2Seq.py #8

bing-95 opened this issue Nov 29, 2018 · 2 comments

Comments

@bing-95
Copy link

bing-95 commented Nov 29, 2018

Hi, in the Mem2Seq.py, I have a question about the GRU's hidden layer.
In the DecoderMemNN init function, the code self.gru = nn.GRU(embedding_dim, embedding_dim, dropout=dropout) doesn't define the GRU's layer_num, so does it have a default one hidden layer?
And in the train_batch and evaluate_batch function, the code decoder_hidden = self.encoder(input_batches).unsqueeze(0) also implies the GRU has one hidden layer.
So, I think, during training and evaluating, the GRU always has only one hidden layer regardless of the args['layer']. Should the code be modified?

Look forward to your reply, thanks.

@jasonwu0731
Copy link
Member

Yes for all the experiments we did are using one layer for the GRU. The args["layer"] we set is for the hyperparameter in the memory network setting, that is, it is for the number of "hops".

Please feel free to try a different number of RNN layers to see if the results can be improved. :)

@bing-95
Copy link
Author

bing-95 commented Nov 29, 2018

Yes for all the experiments we did are using one layer for the GRU. The args["layer"] we set is for the hyperparameter in the memory network setting, that is, it is for the number of "hops".

Please feel free to try a different number of RNN layers to see if the results can be improved. :)

OK, I understantd. Thank you~ :)

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