Unverified Commit bbd9ff8f authored by Prabhat Roy's avatar Prabhat Roy Committed by GitHub
Browse files

[FBcode->GH] Removed type annotations from rcnn (#4883)

parent 0c68a6d0
...@@ -36,22 +36,15 @@ class GeneralizedRCNN(nn.Module): ...@@ -36,22 +36,15 @@ class GeneralizedRCNN(nn.Module):
self._has_warned = False self._has_warned = False
@torch.jit.unused @torch.jit.unused
def eager_outputs( def eager_outputs(self, losses, detections):
self, # type: (Dict[str, Tensor], List[Dict[str, Tensor]]) -> Union[Dict[str, Tensor], List[Dict[str, Tensor]]]
losses: Dict[str, Tensor],
detections: List[Dict[str, Tensor]],
) -> Union[Dict[str, Tensor], List[Dict[str, Tensor]]]:
if self.training: if self.training:
return losses return losses
return detections return detections
def forward( def forward(self, images, targets=None):
self, # type: (List[Tensor], Optional[List[Dict[str, Tensor]]]) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]]
images: List[Tensor],
targets: Optional[List[Dict[str, Tensor]]] = None,
) -> Union[Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]], Dict[str, Tensor], List[Dict[str, Tensor]]]:
""" """
Args: Args:
images (list[Tensor]): images to be processed images (list[Tensor]): images to be processed
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment