diff --git a/paddlex/__init__.py b/paddlex/__init__.py index 49a7a1952e179d219cc0d2e91ddb508dd3339e3c..c8a0df9a2ad6b6e36feec4fe03e762e0cc2eb000 100644 --- a/paddlex/__init__.py +++ b/paddlex/__init__.py @@ -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' diff --git a/paddlex/cv/models/utils/pretrain_weights.py b/paddlex/cv/models/utils/pretrain_weights.py index 5ed806d8b7bdb63c260f4faa896affc5284a1391..048fb933d91de2d2f82b560485851f23dadd3edc 100644 --- a/paddlex/cv/models/utils/pretrain_weights.py +++ b/paddlex/cv/models/utils/pretrain_weights.py @@ -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)) diff --git a/setup.py b/setup.py index eb73b47aac3629b47009ed17e8bf33939f6bcdaf..533e1914d08d9d38fdebd2aefa8f5c12ee751af8 100644 --- a/setup.py +++ b/setup.py @@ -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,