Skip to content

Commit 9a0f87b

Browse files
author
Hans Gaiser
committed
Add missing JIT annotations.
1 parent 738d511 commit 9a0f87b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

torchvision/models/detection/retinanet.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ class RetinaNetRegressionHead(nn.Module):
152152
in_channels (int): number of channels of the input feature
153153
num_anchors (int): number of anchors to be predicted
154154
"""
155+
__annotations__ = {
156+
'box_coder': det_utils.BoxCoder,
157+
}
155158

156159
def __init__(self, in_channels, num_anchors):
157160
super().__init__()
@@ -314,6 +317,10 @@ class RetinaNet(nn.Module):
314317
>>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)]
315318
>>> predictions = model(x)
316319
"""
320+
__annotations__ = {
321+
'box_coder': det_utils.BoxCoder,
322+
'proposal_matcher': det_utils.Matcher,
323+
}
317324

318325
def __init__(self, backbone, num_classes,
319326
# transform parameters

0 commit comments

Comments
 (0)