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

reproducing language modeling results #3

Open
tonytan48 opened this issue Aug 18, 2020 · 1 comment
Open

reproducing language modeling results #3

tonytan48 opened this issue Aug 18, 2020 · 1 comment

Comments

@tonytan48
Copy link

Hi Mr.Gong, congradulate on your work on new language modeling technique. I was trying to reproduce your experiment but some error of the dictionary occured:
image
If I substitute the data.py from original mos repo, like "import data_mos as data" the following error occurs:
image

May I ask for the solution for this? I am not sure is the problem of tokenization part "data.py" or the embedding_regularization part.

Best,
Qingyu Tan

@tonytan48
Copy link
Author

Thank you for the prompt reply.

After pulling the latest branch with the updated "data.py". I still have an error of :
Traceback (most recent call last):
File "main.py", line 285, in
train()
File "main.py", line 228, in train
log_prob, hidden[s_id], rnn_hs, dropped_rnn_hs = parallel_model(cur_data, hidden[s_id], return_h=True, targets=cur_targets, is_switch=is_switch)
File "/home/qingyu.tan/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 477, in call
result = self.forward(*input, **kwargs)
File "/home/qingyu.tan/projects/advsoft/mos-awd-lstm-lm/model.py", line 83, in forward
emb, sigma = embedded_dropout(self.encoder, torch.ones_like(self.encoder.weight), input, dropout=self.dropoute if (self.training and self.use_dropout) else 0, is_training=self.training)
File "/home/qingyu.tan/projects/advsoft/mos-awd-lstm-lm/embed_regularize.py", line 34, in embedded_dropout
X = embed._backend.Embedding.apply(words, masked_embed_weight,
File "/home/qingyu.tan/miniconda3/envs/py36/lib/python3.6/site-packages/torch/nn/backends/backend.py", line 10, in getattr
raise NotImplementedError

May I know can you reproduce the error?
My torch version is 0.4.1.post2

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

1 participant