Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
bbd9ff8f
Unverified
Commit
bbd9ff8f
authored
Nov 08, 2021
by
Prabhat Roy
Committed by
GitHub
Nov 08, 2021
Browse files
[FBcode->GH] Removed type annotations from rcnn (#4883)
parent
0c68a6d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
11 deletions
+4
-11
torchvision/models/detection/generalized_rcnn.py
torchvision/models/detection/generalized_rcnn.py
+4
-11
No files found.
torchvision/models/detection/generalized_rcnn.py
View file @
bbd9ff8f
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment