-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
print_instances_class_histogram raises exception ZeroDivisionError: integer division or modulo by zero #5323
Comments
You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. |
Hi,
Thank you |
Thanks for your response. |
Some more background: our real code looks something like the following: cfg = dt_config.get_cfg()
# many more configuration...
cfg.MODEL.RETINANET.NUM_CLASSES = len(classes) # classes is an empty list
trainer = dt_engine.DefaultTrainer(cfg) It's clear to us that we shouldn't run the trainer without any classes, our point is that is would be nicer to get a clearer message when catching invalid input. |
If by mistake we pass an empty list of classes, we get a ZeroDivisionError exception.
Expected behavior:
An exception indicating the lack of classes, or no exception at all.
Environment:
The text was updated successfully, but these errors were encountered: