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
MMCV
Commits
215a3244
Unverified
Commit
215a3244
authored
Jul 20, 2020
by
Yang Li
Committed by
GitHub
Jul 20, 2020
Browse files
Support update specific steps (#437)
parent
82e5c8e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mmcv/utils/progressbar.py
mmcv/utils/progressbar.py
+3
-2
No files found.
mmcv/utils/progressbar.py
View file @
215a3244
...
@@ -32,8 +32,9 @@ class ProgressBar:
...
@@ -32,8 +32,9 @@ class ProgressBar:
self
.
file
.
flush
()
self
.
file
.
flush
()
self
.
timer
=
Timer
()
self
.
timer
=
Timer
()
def
update
(
self
):
def
update
(
self
,
num_tasks
=
1
):
self
.
completed
+=
1
assert
num_tasks
>
0
self
.
completed
+=
num_tasks
elapsed
=
self
.
timer
.
since_start
()
elapsed
=
self
.
timer
.
since_start
()
if
elapsed
>
0
:
if
elapsed
>
0
:
fps
=
self
.
completed
/
elapsed
fps
=
self
.
completed
/
elapsed
...
...
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