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

Crash on "poch_mean_loss = total_loss / len(train_dataloader)" #26

Open
cxsjabc opened this issue Feb 4, 2023 · 0 comments
Open

Crash on "poch_mean_loss = total_loss / len(train_dataloader)" #26

cxsjabc opened this issue Feb 4, 2023 · 0 comments

Comments

@cxsjabc
Copy link

cxsjabc commented Feb 4, 2023

I met one question, that
"
File "/home/cx/quick_code/github_sources/CPM-main/train.py", line 298, in
main()
File "/home/cx/quick_code/github_sources/CPM-main/train.py", line 294, in main
train(model, logger, train_dataset, args)
File "/home/cx/quick_code/github_sources/CPM-main/train.py", line 184, in train
train_loss = train_epoch(
File "/home/cx/quick_code/github_sources/CPM-main/train.py", line 149, in train_epoch
epoch_mean_loss = total_loss / len(train_dataloader)
ZeroDivisionError: division by zero
python-BaseException
"

len(train_dataloader) is 0.

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