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

ZeroDivisionError: division by zero #5

Open
Psycho-9 opened this issue Mar 21, 2024 · 1 comment
Open

ZeroDivisionError: division by zero #5

Psycho-9 opened this issue Mar 21, 2024 · 1 comment

Comments

@Psycho-9
Copy link

when i run. py, some errors occurred in training.py:

File "train.py", line 106, in
eval_loss, eval_word_score, eval_expRate = eval(params, model, epoch, loader)
File "/home/SAM/training.py", line 192, in eval
return loss_meter.mean, word_right / length, exp_right / cal_num
ZeroDivisionError: division by zero

I found these four parameters: word_right, length, exp_right, cal_num are all 0

@liuzhuang1024
Copy link
Owner

Check if your evaluation data configuration is correct. Debug your loader variable to ensure it meets expectations.

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

2 participants