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 when validating the trained model #73

Open
VedantKhairnar opened this issue May 21, 2020 · 3 comments
Open

ZeroDivisionError when validating the trained model #73

VedantKhairnar opened this issue May 21, 2020 · 3 comments

Comments

@VedantKhairnar
Copy link

This is with respect to this Colab file
After training the model, when it is to be validated using

accuracy, class_based_accuracy = gtf.Evaluate();

ZeroDivision Error was observed
Following is the exact log

--------------------------------------------------------------------------- ZeroDivisionError Traceback (most recent call last) <ipython-input-281-e9c57d0b7fc4> in <module>() 1 # Run validation ----> 2 accuracy, class_based_accuracy = gtf.Evaluate(); monk_v1/monk/system/imports.py in decorator_wrapper(*function_args, **function_args_dicts) monk_v1/monk/gluon/finetune/level_14_master_main.py in Evaluate(self) monk_v1/monk/system/imports.py in decorator_wrapper(*function_args, **function_args_dicts) monk_v1/monk/gluon/finetune/level_4_evaluation_base.py in set_evaluation_final(self) ZeroDivisionError: division by zero

How can this be resolved?

@abhi-kumar
Copy link
Contributor

Please verify the number of classes in training and validation are the same.

@VedantKhairnar
Copy link
Author

They are 15 classes in both training and validation.

@abhi-kumar
Copy link
Contributor

in both the training and inference times, print

ptf.system_dict["dataset"]["params"]["classes"]

And check if there's a blank class in it or not

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