Toybrick

标题: ---onnx模型转换错误! [打印本页]

作者: linuxdog    时间: 2022-3-7 22:46
标题: ---onnx模型转换错误!
我用如下网站下的代码,做了pretrain和提取了onnx模型文件
https://github.com/ultralytics/yolov5

然后放在了:  /rknn-toolkit2-1.0.0_no_docker/examples/onnx/bztest
目录下做了转换处理: (bztest目录是我拷贝resnet50v2的副本改出来的)
(原本的resnet50v2/这个目录下跑python3做模型转换是没有问题的)

$ python3 test.py 跑出来如下错误结果,请问这是啥问题呢?

--> config model
done
--> Loading model
done
--> Building model
E build: Catch exception when building RKNN model!
E build: Traceback (most recent call last):
E build:   File "rknn/api/rknn_base.py", line 2140, in rknn.api.rknn_base.RKNNBase.build
E build:   File "rknn/api/graph_optimizer.py", line 2297, in rknn.api.graph_optimizer.GraphOptimizer.run
E build:   File "rknn/api/graph_optimizer.py", line 2272, in rknn.api.graph_optimizer.GraphOptimizer._sparse_weight
E build:   File "rknn/api/sparse_weight.py", line 521, in rknn.api.sparse_weight.sparse_weight
E build:   File "rknn/api/sparse_weight.py", line 444, in rknn.api.sparse_weight._range_add
E build: ValueError: operands could not be broadcast together with shapes (80,) (3,)
Build resnet50 failed!



作者: linuxdog    时间: 2022-3-8 10:09
太安静了不是




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3