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
ModelZoo
SOLOv2-pytorch
Commits
5421859a
Commit
5421859a
authored
Sep 26, 2018
by
Kai Chen
Browse files
remove comments
parent
db9aaac7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
mmdet/core/parallel/scatter_gather.py
mmdet/core/parallel/scatter_gather.py
+0
-5
No files found.
mmdet/core/parallel/scatter_gather.py
View file @
5421859a
...
...
@@ -16,7 +16,6 @@ def scatter(inputs, target_gpus, dim=0):
if
isinstance
(
obj
,
torch
.
Tensor
):
return
OrigScatter
.
apply
(
target_gpus
,
None
,
dim
,
obj
)
if
isinstance
(
obj
,
DataContainer
):
# print('data container', obj)
if
obj
.
cpu_only
:
return
obj
.
data
else
:
...
...
@@ -24,14 +23,10 @@ def scatter(inputs, target_gpus, dim=0):
if
isinstance
(
obj
,
tuple
)
and
len
(
obj
)
>
0
:
return
list
(
zip
(
*
map
(
scatter_map
,
obj
)))
if
isinstance
(
obj
,
list
)
and
len
(
obj
)
>
0
:
# print('list', obj)
out
=
list
(
map
(
list
,
zip
(
*
map
(
scatter_map
,
obj
))))
# print('list out', out)
return
out
if
isinstance
(
obj
,
dict
)
and
len
(
obj
)
>
0
:
# print('dict\n', obj)
out
=
list
(
map
(
type
(
obj
),
zip
(
*
map
(
scatter_map
,
obj
.
items
()))))
# print('dict output\n', out)
return
out
return
[
obj
for
targets
in
target_gpus
]
...
...
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