check.sh出现错误

我们自己的yolov3剪枝后的模型

工具链版本:horizon_x3_tc_1.1.17e

-------------------------------------------------

log日志:

2020-12-07 10:16:00,223 INFO hb_mapper_checker 63 Model type: onnx

2020-12-07 10:16:00,223 DEBUG hb_mapper_checker 64 march: bernoulli2

2020-12-07 10:16:00,223 INFO hb_mapper_checker 65 output file: ./yolov3_prune.log

2020-12-07 10:16:00,223 INFO hb_mapper_checker 70 input names

2020-12-07 10:16:00,223 INFO hb_mapper_checker 71 input shapes {}

2020-12-07 10:16:00,223 INFO hb_mapper_checker 77 Begin model checking…

2020-12-07 10:16:00,223 INFO build 31 [Mon Dec 7 10:16:00 2020] Start to Horizon NN Model Convert.

2020-12-07 10:16:00,224 INFO build 129 The input parameter is not specified, convert with default parameters.

2020-12-07 10:16:00,224 INFO build 166 The hbdk parameter is not specified, and the submodel will be compiled with the default parameter.

2020-12-07 10:16:00,224 INFO build 116 HorizonNN version: 0.7.6

2020-12-07 10:16:00,224 INFO build 120 HBDK version: 3.12.9

2020-12-07 10:16:00,224 INFO build 31 [Mon Dec 7 10:16:00 2020] Start to parse the onnx model.

2020-12-07 10:16:00,904 INFO onnx_parser 101 ONNX model info:

ONNX IR version: 6

Opset version: 11

Input name: input.1, [1, 3, 608, 608]

2020-12-07 10:16:00,904 WARNING build 446 [Warning]: The opset version of the onnx model is 11, not supported now, the conversion may fail.

2020-12-07 10:16:01,713 INFO build 34 [Mon Dec 7 10:16:01 2020] End to parse the onnx model.

2020-12-07 10:16:01,719 INFO build 256 Model input names: [‘input.1’]

2020-12-07 10:17:01,635 DEBUG tool_utils 94 exception in checker

2020-12-07 10:17:01,644 DEBUG tool_utils 95 Traceback (most recent call last):

File “/root/.local/lib/python3.6/site-packages/x3_tc_ui/utils/tool_utils.py”, line 92, in __decorator

func(*args, **kargs)

File “/root/.local/lib/python3.6/site-packages/x3_tc_ui/hb_mapper.py”, line 67, in checker

input_shape).run(version)

File “/root/.local/lib/python3.6/site-packages/x3_tc_ui/hb_mapper_checker.py”, line 93, in run

**addtional_param)

File “/root/.local/lib/python3.6/site-packages/horizon_nn/build.py”, line 908, in check_onnx

return builder.build_model(original_model, save_model)

File “/root/.local/lib/python3.6/site-packages/horizon_nn/build.py”, line 597, in build_model

self.save_model(original_model, model_name)

File “/root/.local/lib/python3.6/site-packages/horizon_nn/build.py”, line 371, in save_model

pydot_graph.write_dot(model_name + ‘.dot’)

File “/root/.local/lib/python3.6/site-packages/pydot.py”, line 1734, in new_method

encoding=encoding)

File “/root/.local/lib/python3.6/site-packages/pydot.py”, line 1817, in write

s = self.create(prog, format, encoding=encoding)

File “/root/.local/lib/python3.6/site-packages/pydot.py”, line 1945, in create

assert process.returncode == 0, process.returncode

AssertionError: -9

2020-12-07 10:17:01,645 ERROR tool_utils 96 -9

2020-12-07 10:17:01,645 INFO build 34 [Mon Dec 7 10:17:01 2020] End to Horizon NN Model Convert.

你好,这个模型确实在 17 和 18 版本会有 leakyrelu 的报错,已经复现。-

不过我在 19 的内部版本上测试是已经修复了,模型可以正常转换,不过在最后转换版本混合模型(.bin)时会报错,是有 CPU 算子还未实现。

我看了下,应该是把后处理都包含在模型里了吧,一般我们的后处理部分都会剥离出来,在 arm 上通过 C++ 实现,BPU 上只跑卷积等可加速算子

我改了 一下yolov5的网络结构 发现应该是99% 通过了,但是有一个操作(Equal)不支持,但是我看算子支持列表里面支持啊。

不好意思,我确认了下,应该是和研发那边没有对齐,这个算子暂时还没有做开发,因为除了后处理基本用不到。

这个我们会改一下算子支持列表文档,实在抱歉。