Merge pull request from chenghancc/master

speed = 0 if duration == 0 else int(progress_size / (1024*duration))
pull/534/head
Kaiyang 2022-08-16 09:21:56 +08:00 committed by GitHub
commit 9e589c6fc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
torchreid/utils

View File

@ -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' %