-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Transformer tutorial error #682
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
Comments
@dhpollack Thanks for bringing us the issue. Could you submit a PR and fix it? You could assign @zhangguanheng66 and @SethHWeidman for reviewing. |
@zhangguanheng66 I think that I'll have time for a PR. Do you mind if I change other things? Personally, I found the batching a bit awkward, why not use pytorch's built in |
Yes. This part is very true. The current wiki-text dataset is not compatible with It would be great if you could submit a quick fix for the |
@zhangguanheng66 alright, here's the quick fix. I don't have the proper rights to assign you as a reviewer. |
fixed via #695 |
https://github.com/pytorch/tutorials/blob/master/beginner_source/transformer_tutorial.py#L89
Since you are using the
CrossEntropyLoss
, you shouldn't do thelog_softmax
in the above line. You can either switch to theNLLLoss
or remove thelog_softmax
to fix this.The text was updated successfully, but these errors were encountered: