glenn-jocher commited on
Commit
a5818b2
1 Parent(s): 8797246

expired pytorch hub cache bug fix #365

Browse files
Files changed (1) hide show
  1. hubconf.py +2 -2
hubconf.py CHANGED
@@ -27,8 +27,8 @@ def create(name, pretrained, channels, classes):
27
  Returns:
28
  pytorch model
29
  """
 
30
  try:
31
- config = os.path.join(os.path.dirname(__file__), 'models', '%s.yaml' % name) # model.yaml path
32
  model = Model(config, channels, classes)
33
  if pretrained:
34
  ckpt = '%s.pt' % name # checkpoint filename
@@ -39,7 +39,7 @@ def create(name, pretrained, channels, classes):
39
  return model
40
  except Exception as e:
41
  help_url = 'https://github.com/ultralytics/yolov5/issues/36'
42
- print('%s\nCache is 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):
 
27
  Returns:
28
  pytorch model
29
  """
30
+ config = os.path.join(os.path.dirname(__file__), 'models', '%s.yaml' % name) # model.yaml path
31
  try:
 
32
  model = Model(config, channels, classes)
33
  if pretrained:
34
  ckpt = '%s.pt' % name # checkpoint filename
 
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):