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
3d65fc67
Unverified
Commit
3d65fc67
authored
May 21, 2020
by
Francisco Massa
Committed by
GitHub
May 21, 2020
Browse files
Clean-up delteme_all (#2249)
parent
f8e2291d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
torchvision/models/detection/roi_heads.py
torchvision/models/detection/roi_heads.py
+3
-10
No files found.
torchvision/models/detection/roi_heads.py
View file @
3d65fc67
...
...
@@ -614,20 +614,13 @@ class RoIHeads(torch.nn.Module):
return
proposals
def
DELTEME_all
(
self
,
the_list
):
# type: (List[bool]) -> bool
for
i
in
the_list
:
if
not
i
:
return
False
return
True
def
check_targets
(
self
,
targets
):
# type: (Optional[List[Dict[str, Tensor]]]) -> None
assert
targets
is
not
None
assert
self
.
DELTEME_
all
([
"boxes"
in
t
for
t
in
targets
])
assert
self
.
DELTEME_
all
([
"labels"
in
t
for
t
in
targets
])
assert
all
([
"boxes"
in
t
for
t
in
targets
])
assert
all
([
"labels"
in
t
for
t
in
targets
])
if
self
.
has_mask
():
assert
self
.
DELTEME_
all
([
"masks"
in
t
for
t
in
targets
])
assert
all
([
"masks"
in
t
for
t
in
targets
])
def
select_training_samples
(
self
,
proposals
,
# type: List[Tensor]
...
...
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