Skip to content

Commit

Permalink
Added python model tests for retinanet 50 (pytorch#2803)
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 authored and bryant1410 committed Nov 22, 2020
1 parent 9768861 commit e9be62d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def get_available_video_models():
"keypointrcnn_resnet50_fpn": {
'unwrapper': lambda x: x[1]
},
"retinanet_resnet50_fpn": {
'unwrapper': lambda x: x[1]
}
}


Expand Down
2 changes: 1 addition & 1 deletion torchvision/models/detection/retinanet.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def forward(self, images, targets=None):
if not self._has_warned:
warnings.warn("RetinaNet always returns a (Losses, Detections) tuple in scripting")
self._has_warned = True
return (losses, detections)
return losses, detections
return self.eager_outputs(losses, detections)


Expand Down

0 comments on commit e9be62d

Please sign in to comment.