yunjey / pytorch-tutorial

PyTorch Tutorial for Deep Learning Researchers
MIT License
29.79k stars 8.03k forks source link

there was a problem in language model #185

Open TobeyLi opened 5 years ago

TobeyLi commented 5 years ago

hello,when I try to run pytorch-tutorial/tutorials/02-intermediate/language_model/main.py this file,but I got some error,Firstly,when it comes to "ids = corpus.get_data('data/train.txt', batch_size)",it will display shape '[20,-1]' is invalid for input of size 929589,Is there any wrong with the train.txt? Secondly,sample.txt doesn't contain in the dictionary 'data'.Hope you can fix it,thanks!

OrangeC93 commented 4 years ago

The code works for me. You may need to check your code again.