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

Getting this error ZeroDivisionError: integer division or modulo by zero while training #10

Closed
archmord opened this issue May 5, 2019 · 3 comments

Comments

@archmord
Copy link

archmord commented May 5, 2019

Im getting error while training on this cell
!PYTHONPATH=src ./train.py --dataset /content/gpt-2/goblet_book.txt --model_name '345M'
Traceback (most recent call last): File "./train.py", line 266, in <module> main() File "./train.py", line 244, in main feed_dict={context: sample_batch()}) File "./train.py", line 220, in sample_batch return [data_sampler.sample(1024) for _ in range(args.batch_size)] File "./train.py", line 220, in <listcomp> return [data_sampler.sample(1024) for _ in range(args.batch_size)] File "/content/gpt-2/src/load_dataset.py", line 74, in sample self.chunks ZeroDivisionError: integer division or modulo by zero

@gsarti
Copy link

gsarti commented May 5, 2019

You don't have a goblet_book.txt file in your drive, don't you? @ak9250 forgot to change the train string after changing the previous file in the wget command from the "Goblet of Fire" to "A Tale of Two Cities".

Just change the command to !PYTHONPATH=src ./train.py --dataset /content/gpt-2/98-0.txt --model_name '345M' for testing the notebook, this should be fixed soon! 😃

@ak9250
Copy link
Owner

ak9250 commented May 6, 2019

@aliasgar1530 I have added the fix thanks for opening issue and @gsarti thanks for replying with the fix

@archmord
Copy link
Author

archmord commented May 6, 2019

it fixed now
thanks

@archmord archmord closed this as completed May 6, 2019
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

3 participants