-
Notifications
You must be signed in to change notification settings - Fork 133
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: float division by zero in loss function #203
Comments
I think this occurs when the dataloader returns an empty set of matches (which happens very rarely and is probably why we didn't catch it earlier). Should be a simple fix to add a check on whether the size is zero and skip it if so. Will PR a fix as soon as we have time. |
See the branch I linked at end of this issue: #204
I think should fix?
…On Thu, Oct 24, 2019 at 6:36 AM Lucas Manuelli ***@***.***> wrote:
I think this occurs when the dataloader returns an empty set of matches
(which happens very rarely and is probably why we didn't catch it earlier).
Should be a simple fix to add a check on whether the size is zero and skip
it if so. Will PR a fix as soon as we have time.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#203?email_source=notifications&email_token=ABLBBKF47OFFSU52NASNF5DQQGQF7A5CNFSM4II3EPO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECFBS3Q#issuecomment-545921390>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLBBKEM7LYZQEAZLKZ4QHDQQGQF7ANCNFSM4II3EPOQ>
.
|
Yes that fixes it. So that's a good short term solution. @peteflorence if you PR I am happy to review and merge. |
After applying @peteflorence's fix dense_correspondence/experiments/shoes/training_shoes.ipynb script now runs fine. However, I still get exactly the same "ZeroDivisionError: float division by zero" error as per the OP when running the mug training script: |
I also got the same error when training on mugs_all.yaml. Here is the entire message. It looks like one of the mask is empty. |
Run script in
meet a ZeroDivisionError
Dataset is
It seems that in some case, the num_matches == 0 cause the error. How to fix it?
Error msg is as follows:
The text was updated successfully, but these errors were encountered: