Skip to content

Commit 34e24bf

Browse files
committed
Removed type annotations from rcnn
1 parent 0c68a6d commit 34e24bf

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

torchvision/models/detection/generalized_rcnn.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,15 @@ def __init__(self, backbone: nn.Module, rpn: nn.Module, roi_heads: nn.Module, tr
3636
self._has_warned = False
3737

3838
@torch.jit.unused
39-
def eager_outputs(
40-
self,
41-
losses: Dict[str, Tensor],
42-
detections: List[Dict[str, Tensor]],
43-
) -> Union[Dict[str, Tensor], List[Dict[str, Tensor]]]:
44-
39+
def eager_outputs(self, losses, detections):
40+
# type: (Dict[str, Tensor], List[Dict[str, Tensor]]) -> Union[Dict[str, Tensor], List[Dict[str, Tensor]]]
4541
if self.training:
4642
return losses
4743

4844
return detections
4945

50-
def forward(
51-
self,
52-
images: List[Tensor],
53-
targets: Optional[List[Dict[str, Tensor]]] = None,
54-
) -> Union[Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]], Dict[str, Tensor], List[Dict[str, Tensor]]]:
46+
def forward(self, images, targets=None):
47+
# type: (List[Tensor], Optional[List[Dict[str, Tensor]]]) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]]
5548
"""
5649
Args:
5750
images (list[Tensor]): images to be processed

0 commit comments

Comments
 (0)