未验证 提交 41d1a654 编写于 作者: T Tingquan Gao 提交者: GitHub

[Cherry Pick] Fix "tar" to "pdparams" to adapt to dygraph (#497)

* Fix "tar" to "pdparams" to adapt to dygraph

* Update the download link of Paddle Inference Library
上级 b37f79a6
......@@ -12,13 +12,13 @@ PaddleClas在Windows 平台下基于`Visual Studio 2019 Community` 进行了测
**下面所有示例以工作目录为 `D:\projects`演示**
### Step1: 下载PaddlePaddle C++ 预测库 fluid_inference
### Step1: 下载PaddlePaddle C++ 预测库 paddle_inference_install_dir
PaddlePaddle C++ 预测库针对不同的`CPU``CUDA`版本提供了不同的预编译版本,请根据实际情况下载: [C++预测库下载列表](https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/advanced_guide/inference_deployment/inference/windows_cpp_inference.html)
PaddlePaddle C++ 预测库针对不同的`CPU``CUDA`版本提供了不同的预编译版本,请根据实际情况下载: [C++预测库下载列表](https://www.paddlepaddle.org.cn/documentation/docs/zh/2.0-rc1/guides/05_inference_deployment/inference/windows_cpp_inference.html)
解压后`D:\projects\fluid_inference`目录包含内容为:
解压后`D:\projects\paddle_inference_install_dir`目录包含内容为:
```
fluid_inference
paddle_inference_install_dir
├── paddle # paddle核心库和头文件
|
├── third_party # 第三方依赖库和头文件
......@@ -62,7 +62,7 @@ fluid_inference
| CMAKE_BUILD_TYPE | RelWithDebInfo | [√] |
| CUDA_LIB | CUDA的库路径 | [√] |
| CUDNN_LIB | CUDNN的库路径 | [√] |
| OPENCV_DIR | OpenCV的安装路径 | [√] |
| OpenCV_DIR | OpenCV的安装路径 | [√] |
| PADDLE_LIB | Paddle预测库的路径 | [√] |
| WITH_GPU | [√] | [√] |
| WITH_MKL | [√] | [√] |
......
......@@ -58,8 +58,8 @@ class RetryError(Exception):
super(RetryError, self).__init__(message)
def _get_url(architecture, postfix="tar"):
prefix = "https://paddle-imagenet-models-name.bj.bcebos.com/"
def _get_url(architecture, postfix="pdparams"):
prefix = "https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/"
fname = architecture + "_pretrained." + postfix
return prefix + fname
......@@ -201,7 +201,7 @@ def list_models():
return
def get(architecture, path, decompress=True, postfix="tar"):
def get(architecture, path, decompress=False, postfix="pdparams"):
"""
Get the pretrained model.
"""
......
......@@ -29,8 +29,8 @@ def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('-a', '--architecture', type=str, default='ResNet50')
parser.add_argument('-p', '--path', type=str, default='./pretrained/')
parser.add_argument('--postfix', type=str, default="tar")
parser.add_argument('-d', '--decompress', type=str2bool, default=True)
parser.add_argument('--postfix', type=str, default="pdparams")
parser.add_argument('-d', '--decompress', type=str2bool, default=False)
parser.add_argument('-l', '--list', type=str2bool, default=False)
args = parser.parse_args()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册