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

Make the code compatible with PyTorch 0.4.1 #9

Merged
merged 7 commits into from
Oct 22, 2018

Conversation

billy-inn
Copy link
Contributor

The code is tested on Penn Treebank. There is a small gap between my results with the results reported in the paper.

MoS w/o finetune:
Valid 58.34 Test 56.18
MoS:
Valid 56.83 Test 54.64
MoS + dynamic evaluation:
Valid 49.03 Test: 48.43

@kimiyoung kimiyoung merged commit 6f89b28 into zihangdai:master Oct 22, 2018
@@ -95,7 +95,8 @@ def gradstat():

while i < train_data.size(0) - 1 - 1:
seq_len = args.bptt
model.eval()
model.train()
model.use_dropout = False
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we turn off dropout?

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

Successfully merging this pull request may close these issues.

3 participants