Skip to content

Commit eed06f4

Browse files
committed
Fix type error.
1 parent c9c8148 commit eed06f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

torchvision/models/detection/retinanet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ def postprocess_detections(self, head_outputs, anchors, image_shapes):
454454

455455
return detections
456456

457-
def _anchors_per_level(self, features, HWA):
457+
def _anchors_per_level(self, features: List[Tensor], HWA: int):
458458
# recover level sizes
459459
num_anchors_per_level = [x.size(2) * x.size(3) for x in features]
460460
HW = 0

torchvision/models/detection/ssd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def __init__(self, backbone: nn.Module, num_classes: int,
141141
# used only on torchscript mode
142142
self._has_warned = False
143143

144-
def _anchors_per_level(self, features, HWA):
144+
def _anchors_per_level(self, features: List[Tensor], HWA: int):
145145
# TODO: Discuss/refactor this workaround
146146
num_anchors_per_level = [x.size(2) * x.size(3) * anchors for x, anchors in zip(features, self.num_anchors)]
147147
HW = 0

0 commit comments

Comments
 (0)