glenn-jocher commited on
Commit
84a9466
·
1 Parent(s): 3e8c89d

update hubconf.py

Browse files
Files changed (1) hide show
  1. hubconf.py +3 -1
hubconf.py CHANGED
@@ -37,9 +37,11 @@ def create(name, pretrained, channels, classes):
37
  state_dict = {k: v for k, v in state_dict.items() if model.state_dict()[k].shape == v.shape} # filter
38
  model.load_state_dict(state_dict, strict=False) # load
39
  return model
 
40
  except Exception as e:
41
  help_url = 'https://github.com/ultralytics/yolov5/issues/36'
42
- print('%s\nCache maybe be out of date. Delete cache and retry. See %s for help.' % (e, help_url))
 
43
 
44
 
45
  def yolov5s(pretrained=False, channels=3, classes=80):
 
37
  state_dict = {k: v for k, v in state_dict.items() if model.state_dict()[k].shape == v.shape} # filter
38
  model.load_state_dict(state_dict, strict=False) # load
39
  return model
40
+
41
  except Exception as e:
42
  help_url = 'https://github.com/ultralytics/yolov5/issues/36'
43
+ s = 'Cache maybe be out of date, deleting cache and retrying may solve this. See %s for help.' % help_url
44
+ raise Exception(s) from e
45
 
46
 
47
  def yolov5s(pretrained=False, channels=3, classes=80):