Merge pull request #519 from chenghancc/master
speed = 0 if duration == 0 else int(progress_size / (1024*duration))pull/534/head
commit
9e589c6fc7
torchreid/utils
|
@ -83,7 +83,7 @@ def download_url(url, dst):
|
|||
return
|
||||
duration = time.time() - start_time
|
||||
progress_size = int(count * block_size)
|
||||
speed = int(progress_size / (1024*duration))
|
||||
speed = 0 if duration == 0 else int(progress_size / (1024*duration))
|
||||
percent = int(count * block_size * 100 / total_size)
|
||||
sys.stdout.write(
|
||||
'\r...%d%%, %d MB, %d KB/s, %d seconds passed' %
|
||||
|
|
Loading…
Reference in New Issue