From 3834b779615ee4bad7fe688cccc898003816608d Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Thu, 21 Nov 2019 11:52:48 -0800 Subject: [PATCH] updates --- models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/models.py b/models.py index 37c272e0..31350979 100755 --- a/models.py +++ b/models.py @@ -442,3 +442,6 @@ def attempt_download(weights): os.system('rm ' + weights) # remove partial downloads 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)