We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If there are no masks in the crop or image, then the current code divides by zero:
devit/detectron2/modeling/meta_arch/devit.py
Line 180 in cfd0e0e
The simple solution is:
loss = loss.sum() if num_masks != 0: loss /= num_masks return loss
Same here:
Line 199 in cfd0e0e
loss = loss.mean(1).sum() if num_masks != 0: loss /= num_masks return loss
And also there:
Line 1321 in cfd0e0e
And the fix is:
def fixed_l1_loss(input, target): res = F.l1_loss(input, target) if input.shape[0] == 0: res = torch.zeros_like(res) return res
loss_dict[f"rg_l1_loss_{i}"] = fixed_l1_loss( pred_region_coords, gt_region_coords )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
If there are no masks in the crop or image, then the current code divides by zero:
devit/detectron2/modeling/meta_arch/devit.py
Line 180 in cfd0e0e
The simple solution is:
Same here:
devit/detectron2/modeling/meta_arch/devit.py
Line 199 in cfd0e0e
The solution is then:
And also there:
devit/detectron2/modeling/meta_arch/devit.py
Line 1321 in cfd0e0e
And the fix is:
The text was updated successfully, but these errors were encountered: