未验证 提交 b9606d01 编写于 作者: L Liufang Sang 提交者: GitHub

cherry-pick fix load inference in quant_post demo (#301) (#303)

上级 c19fc279
......@@ -62,7 +62,7 @@ top1_acc/top5_acc= [0.70913923 0.89548034]
使用以下命令测试离线量化后的模型的精度:
```
python eval.py --model_path ./quant_model_train/MobileNet
python eval.py --model_path ./quant_model_train/MobileNet --model_name __model__ --params_name __params__
```
精度输出为
......
......@@ -282,6 +282,8 @@
"source": [
"quant_post_prog, feed_target_names, fetch_targets = fluid.io.load_inference_model(\n",
" dirname='./quant_post_model',\n",
" model_filename='__model__',\n",
" params_filename='__params__',\n",
" executor=exe)\n",
"test(quant_post_prog, fetch_targets)"
]
......
......@@ -116,6 +116,8 @@ Load the model after post training quantization in ``'./quant_post_model'`` and
```python
quant_post_prog, feed_target_names, fetch_targets = fluid.io.load_inference_model(
dirname='./quant_post_model',
model_filename='__model__',
params_filename='__params__',
executor=exe)
test(quant_post_prog, fetch_targets)
```
......@@ -123,6 +123,8 @@ slim.quant.quant_post(
```python
quant_post_prog, feed_target_names, fetch_targets = fluid.io.load_inference_model(
dirname='./quant_post_model',
model_filename='__model__',
params_filename='__params__',
executor=exe)
test(quant_post_prog, fetch_targets)
```
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册