yolov11训练出来的模型onnx转成kmodel

Viewed 75

问题描述


python to_kmodel.py --target k230 --model best.onnx --dataset ceshitext --input_width 224 --input_height 224 --ptq_option 0当运行这段代码出现了这个报错AttributeError: module 'onnx._mapping' has no attribute 'TENSOR_TYPE_TO_NP_TYPE'好像是因为to kmoedl的版本有点低导致的怎么解决

复现步骤


onnx转kmodel运行这个
python to_kmodel.py --target k230 --model best.onnx --dataset ceshitext --input_width 224 --input_height 224 --ptq_option 0

硬件板卡


庐山派

1 Answers

改一下onnx相关包的版本:
onnx 1.16.0
onnxruntime 1.18.0
onnxsim 0.4.36