From cd11954ea84a9b0c63d0d7c0e4aeb40f56f4dfa9 Mon Sep 17 00:00:00 2001 From: AllentDan Date: Mon, 17 Jul 2023 15:16:40 +0800 Subject: [PATCH] fix int type --- csrc/mmdeploy/net/rknn/rknn_net.cpp | 2 +- docs/zh_cn/01-how-to-build/rockchip.md | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/csrc/mmdeploy/net/rknn/rknn_net.cpp b/csrc/mmdeploy/net/rknn/rknn_net.cpp index 9e3a58a345..149cc29a3b 100644 --- a/csrc/mmdeploy/net/rknn/rknn_net.cpp +++ b/csrc/mmdeploy/net/rknn/rknn_net.cpp @@ -170,7 +170,7 @@ Result RKNNNet::Init(const Value& args) { MMDEPLOY_ERROR("rknn query 'RKNN_QUERY_INPUT_ATTR' fail! ret: {}", ret); return Status(eFail); } - if (attr.type != RKNN_TENSOR_UINT8) { + if (attr.type != RKNN_TENSOR_UINT8 || attr.type != RKNN_TENSOR_INT8) { MMDEPLOY_ERROR("MMDeploy SDK only supports RKNN-INT8 model"); return Status(eInvalidArgument); } diff --git a/docs/zh_cn/01-how-to-build/rockchip.md b/docs/zh_cn/01-how-to-build/rockchip.md index 8c1d6c1e8f..b44e10b8da 100644 --- a/docs/zh_cn/01-how-to-build/rockchip.md +++ b/docs/zh_cn/01-how-to-build/rockchip.md @@ -130,8 +130,13 @@ git clone https://github.com/open-mmlab/mmdetection # 执行转换命令 python tools/deploy.py \ - configs/mmpretrain/detection_rknn_static.py \ - + configs/mmdet/detection/detection_rknn-int8_static-320x320.py \ + /the/path/of/mmdet/configs/yolov3/yolov3_mobilenetv2_320_300e_coco.py \ + https://download.openmmlab.com/mmdetection/v2.0/yolo/yolov3_mobilenetv2_320_300e_coco/yolov3_mobilenetv2_320_300e_coco_20210719_215349-d18dff72.pth \ + /the/path/of/mmdet/demo/demo.jpg \ + --work-dir mmdeploy_models/mmdet/yolov3 \ + --device cpu \ + --dump-info ``` - RTMDet