代码拉取完成,页面将自动刷新
模型转换结束后,MMDeploy 提供了 tools/test.py
做为单测工具。
需要参照 安装说明 完成依赖安装 ,按照 转换说明 转出模型。
python tools/test.py \
${DEPLOY_CFG} \
${MODEL_CFG} \
--model ${BACKEND_MODEL_FILES} \
[--speed-test] \
[--warmup ${WARM_UP}] \
[--log-interval ${LOG_INTERVERL}] \
[--log2file ${LOG_RESULT_TO_FILE}]
参数 | 说明 |
---|---|
deploy_cfg | 部署配置文件 |
model_cfg | codebase 中的模型配置文件 |
log2file | 保存日志和运行文件的路径 |
speed-test | 是否做速度测试 |
warm-up | 执行前是否 warm-up |
log-interval | 日志打印间隔 |
执行模型推理
python tools/test.py \
configs/mmcls/classification_onnxruntime_static.py \
{MMCLS_DIR}/configs/resnet/resnet50_b32x8_imagenet.py \
--model model.onnx \
--out out.pkl \
--device cuda:0
profile 速度测试
python tools/test.py \
configs/mmcls/classification_onnxruntime_static.py \
{MMCLS_DIR}/configs/resnet/resnet50_b32x8_imagenet.py \
--model model.onnx \
--speed-test \
--device cpu
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。