Skip to content
Snippets Groups Projects
Commit 2b8a5f8d authored by Cao Yuhang's avatar Cao Yuhang Committed by Kai Chen
Browse files

add nan checking in ssd head (#1935)

parent 318fc76c
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,12 @@ class SSDHead(AnchorHead):
all_bbox_weights = torch.cat(bbox_weights_list,
-2).view(num_images, -1, 4)
# check NaN and Inf
assert torch.isfinite(all_cls_scores).all().item(), \
'classification scores become infinite or NaN!'
assert torch.isfinite(all_bbox_preds).all().item(), \
'bbox predications become infinite or NaN!'
losses_cls, losses_bbox = multi_apply(
self.loss_single,
all_cls_scores,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment