Tessellate-Imaging / monk_v1

Monk is a low code Deep Learning tool and a unified wrapper for Computer Vision.
Apache License 2.0
582 stars 215 forks source link

ZeroDivisionError when validating the trained model #73

Open VedantKhairnar opened 4 years ago

VedantKhairnar commented 4 years ago

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)

in () 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 commented 4 years ago

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

VedantKhairnar commented 4 years ago

They are 15 classes in both training and validation.

abhi-kumar commented 4 years ago

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