用户您好,请详细描述您所遇到的问题。
1.硬件获取渠道:技术合作
2.当前系统镜像版本:openexplorer/ai_toolchain_centos_7_j5:v1.1.29
3.当前天工开物版本:horizon_j5_open_explorer_v1.1.29_20221103
4.问题定位:pytorch训练了一个模型,使用 ScatterElements算子,一共3个输入,满足ScatterElements算子使用说明:
from_type支持:
- data:float32类型。
- indices:int32类型。
- updates:float32类型。
通过hb_mapper checker校验,在量化编译过程中出错。
2022-12-07 11:48:14,676 INFO There are 100 samples in the calibration data set.
2022-12-07 11:48:14,969 INFO Run calibration model with default calibration method.
2022-12-07 11:48:15,014 ERROR [ONNXRuntimeError] : 2 : INVALID_ARGUMENT : Unexpected input data type. Actual: (N11onnxruntime17PrimitiveDataTypeIfEE) , expected: (N11onnxruntime17PrimitiveDataTypeIiEE)
2022-12-07 11:48:15,017 ERROR *** ERROR-OCCUR-DURING {horizon_nn.build_onnx} ***
2022-12-07 11:48:15,019 INFO [Wed Dec 7 11:48:15 2022] End to calibrate the model.
2022-12-07 11:48:15,021 INFO [Wed Dec 7 11:48:15 2022] End to Horizon NN Model Convert.
5.开发的demo/案例:
6.需要提供的解决方案: 由于校准数据只支持uint8和float32类型。因此在量化校准数据中,三个输入均准备了float32类型。 但是提示和indices的int32类型不匹配。请问如何解决? 或者模型中带有ScatterElements算子时,如何进行量化编译?

