mirror of https://github.com/open-mmlab/mmcv.git
Support update specific steps (#437)
parent
82e5c8e552
commit
215a324414
|
@ -32,8 +32,9 @@ class ProgressBar:
|
|||
self.file.flush()
|
||||
self.timer = Timer()
|
||||
|
||||
def update(self):
|
||||
self.completed += 1
|
||||
def update(self, num_tasks=1):
|
||||
assert num_tasks > 0
|
||||
self.completed += num_tasks
|
||||
elapsed = self.timer.since_start()
|
||||
if elapsed > 0:
|
||||
fps = self.completed / elapsed
|
||||
|
|
Loading…
Reference in New Issue