This commit is contained in:
Glenn Jocher 2019-11-21 11:52:48 -08:00
parent 7c59715fda
commit 3834b77961
1 changed files with 3 additions and 0 deletions

View File

@ -442,3 +442,6 @@ def attempt_download(weights):
os.system('rm ' + weights) # remove partial downloads os.system('rm ' + weights) # remove partial downloads
assert os.path.exists(weights), msg # download missing weights from Google Drive assert os.path.exists(weights), msg # download missing weights from Google Drive
if os.path.getsize(weights) < 5E6: # weights < 5MB (too small), download failed
os.remove(weights) # delete corrupted weightsfile
print(msg)