提交 f7d204e0 编写于 作者: J jiangjiajun

fix bug for get_pretrain_weights

上级 42ae71f9
......@@ -25,4 +25,4 @@ load_model = cv.models.load_model
datasets = cv.datasets
log_level = 2
__version__ = '0.1.0.github'
__version__ = '0.1.1.github'
......@@ -76,10 +76,10 @@ def get_pretrain_weights(flag, model_type, backbone, save_dir):
try:
hub.download(backbone, save_path=new_save_dir)
except Exception as e:
if isinstance(hub.ResourceNotFoundError):
if isinstance(e, hub.ResourceNotFoundError):
raise Exception(
"Resource for backbone {} not found".format(backbone))
elif isinstance(hub.ServerConnectionError):
elif isinstance(e, hub.ServerConnectionError):
raise Exception(
"Cannot get reource for backbone {}, please check your internet connecgtion"
.format(backbone))
......
......@@ -19,7 +19,7 @@ long_description = "PaddleX. A end-to-end deeplearning model development toolkit
setuptools.setup(
name="paddlex",
version='0.1.0',
version='0.1.1',
author="paddlex",
author_email="paddlex@baidu.com",
description=long_description,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册