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
12d91ee9
Commit
12d91ee9
authored
Apr 10, 2019
by
Kai Chen
Browse files
only print the progress bar for rank 0
parent
fd67644c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
mmdet/core/evaluation/eval_hooks.py
mmdet/core/evaluation/eval_hooks.py
+5
-3
No files found.
mmdet/core/evaluation/eval_hooks.py
View file @
12d91ee9
...
...
@@ -34,6 +34,7 @@ class DistEvalHook(Hook):
return
runner
.
model
.
eval
()
results
=
[
None
for
_
in
range
(
len
(
self
.
dataset
))]
if
runner
.
rank
==
0
:
prog_bar
=
mmcv
.
ProgressBar
(
len
(
self
.
dataset
))
for
idx
in
range
(
runner
.
rank
,
len
(
self
.
dataset
),
runner
.
world_size
):
data
=
self
.
dataset
[
idx
]
...
...
@@ -48,6 +49,7 @@ class DistEvalHook(Hook):
results
[
idx
]
=
result
batch_size
=
runner
.
world_size
if
runner
.
rank
==
0
:
for
_
in
range
(
batch_size
):
prog_bar
.
update
()
...
...
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