From 80d24fc4da158a7fb0c973a011f9bf8f5a0c6250 Mon Sep 17 00:00:00 2001 From: OldDreamInWind <108687632+OldDreamInWind@users.noreply.github.com> Date: Fri, 5 Aug 2022 11:30:30 +0800 Subject: [PATCH] fix error when set device cpu && fix docs error (#866) --- docs/zh_cn/02-how-to-run/quantize_model.md | 4 ++-- tools/deploy.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/zh_cn/02-how-to-run/quantize_model.md b/docs/zh_cn/02-how-to-run/quantize_model.md index d3c339f248..adea0236dd 100644 --- a/docs/zh_cn/02-how-to-run/quantize_model.md +++ b/docs/zh_cn/02-how-to-run/quantize_model.md @@ -43,8 +43,8 @@ python3 setup.py install ```bash cd /path/to/mmdeploy -export MODEL_PATH=/path/to/mmclassification/configs/resnet/resnet18_8xb16_cifar10.py -export MODEL_CONFIG=https://download.openmmlab.com/mmclassification/v0/resnet/resnet18_b16x8_cifar10_20210528-bd6371c8.pth +export MODEL_CONFIG=/path/to/mmclassification/configs/resnet/resnet18_8xb16_cifar10.py +export MODEL_PATH=https://download.openmmlab.com/mmclassification/v0/resnet/resnet18_b16x8_cifar10_20210528-bd6371c8.pth python3 tools/deploy.py configs/mmcls/classification_ncnn-int8_static.py ${MODEL_CONFIG} ${MODEL_PATH} /path/to/self-test.png --work-dir work_dir --device cpu --quant --quant-image-dir /path/to/images ... diff --git a/tools/deploy.py b/tools/deploy.py index 0452cec23f..73135a6e3c 100644 --- a/tools/deploy.py +++ b/tools/deploy.py @@ -255,7 +255,7 @@ def main(): 'ncnn quant table', target=get_table, args=(onnx_path, deploy_cfg, model_cfg, quant_onnx, - quant_table, quant_image_dir), + quant_table, quant_image_dir, args.device), kwargs=dict(), ret_value=ret_value)