Skip to content
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.

Fixed bug in model when evaluating if no detection was found #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flifuehu
Copy link

Hi yhenon,

First of all, thanks for your work here, it's amazing. Now, I think I may have found an error when evaluating the accuracy of the network. Please correct me if I'm wrong, but I think line 271 of model.py:

return [torch.zeros(0), torch.zeros(0), torch.zeros(0, 4)]

should read:

return [torch.zeros(1), torch.zeros(1), torch.zeros(1, 4)]

Otherwise, DataParallel will give an error when asserting that all variables are CUDA after gathering them if no scores_over_thresh > 0 is found.

@AljoSt
Copy link

AljoSt commented Mar 13, 2019

Should it not rather contain the batch size?
so return [torch.zeros(batch_size, 0), torch.zeros(batch_size, 0), torch.zeros(batch_size, 0, 4)]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants