"...text-generation-inference.git" did not exist on "7a48a84784b74f9ea12cf04a3c4572c027cec2e4"
Commit c728193f authored by Kai Chen's avatar Kai Chen
Browse files

bug fix for the latest torchvision

parent e2e109e4
...@@ -107,8 +107,9 @@ def load_checkpoint(model, ...@@ -107,8 +107,9 @@ def load_checkpoint(model,
torchvision.models.__path__): torchvision.models.__path__):
if not ispkg: if not ispkg:
_zoo = import_module('torchvision.models.{}'.format(name)) _zoo = import_module('torchvision.models.{}'.format(name))
_urls = getattr(_zoo, 'model_urls') if hasattr(_zoo, 'model_urls'):
model_urls.update(_urls) _urls = getattr(_zoo, 'model_urls')
model_urls.update(_urls)
model_name = filename[11:] model_name = filename[11:]
checkpoint = model_zoo.load_url(model_urls[model_name]) checkpoint = model_zoo.load_url(model_urls[model_name])
elif filename.startswith('open-mmlab://'): elif filename.startswith('open-mmlab://'):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment