生成的onnx模型在ai_toolchain中进行模型check检查时出现错误Segmentation fault

生成好的onnx模型在使用 hb_mapper checker检查时出现Segmentation fault,开发者工具版本为horizon_xj3_open_explorer_v2.2.3_20220617,希望能帮忙解决

[root@293c13622561 codes]# hb_mapper checker --model-type onnx --march bernoulli2 --model best1.onnx

2022-12-21 19:23:37,154 INFO Start hb_mapper…

2022-12-21 19:23:37,154 INFO log will be stored in /data/horizon_x3/codes/hb_mapper_checker.log

2022-12-21 19:23:37,155 INFO hbdk version 3.27.1

2022-12-21 19:23:37,155 INFO horizon_nn version 0.12.8

2022-12-21 19:23:37,156 INFO hb_mapper version 1.5.7

2022-12-21 19:23:37,156 WARNING parameter [output] is deprecated

2022-12-21 19:23:37,327 INFO Model type: onnx

2022-12-21 19:23:37,328 INFO input names

2022-12-21 19:23:37,329 INFO input shapes {}

2022-12-21 19:23:37,329 INFO Begin model checking…

2022-12-21 19:23:37,332 INFO [Wed Dec 21 19:23:37 2022] Start to Horizon NN Model Convert.

2022-12-21 19:23:37,333 INFO The input parameter is not specified, convert with default parameters.

2022-12-21 19:23:37,333 INFO The hbdk parameter is not specified, and the submodel will be compiled with the default parameter.

2022-12-21 19:23:37,334 INFO HorizonNN version: 0.12.8

2022-12-21 19:23:37,334 INFO HBDK version: 3.27.1

2022-12-21 19:23:37,335 INFO [Wed Dec 21 19:23:37 2022] Start to parse the onnx model.

2022-12-21 19:23:37,984 INFO ONNX model info:

ONNX IR version: 6

Opset version: 11

Input name: input, [1, 32, 256, 7]

2022-12-21 19:23:39,214 INFO [Wed Dec 21 19:23:39 2022] End to parse the onnx model.

2022-12-21 19:23:39,241 INFO Model input names: [‘input’]

2022-12-21 19:23:39,426 INFO Saving the original float model: ./.hb_check/original_float_model.onnx.

2022-12-21 19:23:39,442 INFO [Wed Dec 21 19:23:39 2022] Start to optimize the model.

Segmentation fault

best1_20221222110310.zip

您好,这是由于模型中包含if算子导致,目前if算子尚不支持哈-

您好,已经将全部if算子去除,还是报一样的错,是有其他算子不支持吗?

[root@293c13622561 codes]# hb_mapper checker --model-type onnx --march bernoulli2 --model best2.onnx

2022-12-23 11:07:27,844 INFO Start hb_mapper…

2022-12-23 11:07:27,844 INFO log will be stored in /data/horizon_x3/codes/hb_mapper_checker.log

2022-12-23 11:07:27,845 INFO hbdk version 3.27.1

2022-12-23 11:07:27,845 INFO horizon_nn version 0.12.8

2022-12-23 11:07:27,846 INFO hb_mapper version 1.5.7

2022-12-23 11:07:27,846 WARNING parameter [output] is deprecated

2022-12-23 11:07:28,053 INFO Model type: onnx

2022-12-23 11:07:28,054 INFO input names

2022-12-23 11:07:28,056 INFO input shapes {}

2022-12-23 11:07:28,056 INFO Begin model checking…

2022-12-23 11:07:28,058 INFO [Fri Dec 23 11:07:28 2022] Start to Horizon NN Model Convert.

2022-12-23 11:07:28,058 INFO The input parameter is not specified, convert with default parameters.

2022-12-23 11:07:28,058 INFO The hbdk parameter is not specified, and the submodel will be compiled with the default parameter.

2022-12-23 11:07:28,059 INFO HorizonNN version: 0.12.8

2022-12-23 11:07:28,059 INFO HBDK version: 3.27.1

2022-12-23 11:07:28,059 INFO [Fri Dec 23 11:07:28 2022] Start to parse the onnx model.

2022-12-23 11:07:28,773 INFO ONNX model info:

ONNX IR version: 6

Opset version: 11

Input name: input, [1, 32, 256, 7]

2022-12-23 11:07:30,063 INFO [Fri Dec 23 11:07:30 2022] End to parse the onnx model.

2022-12-23 11:07:30,094 INFO Model input names: [‘input’]

2022-12-23 11:07:30,284 INFO Saving the original float model: ./.hb_check/original_float_model.onnx.

2022-12-23 11:07:30,300 INFO [Fri Dec 23 11:07:30 2022] Start to optimize the model.

Segmentation fault

回复中我无法添加附件,如果方便的话可以加个微信把模型发您,帮我看一下嘛

可以添加右下角地平线小助手的微信,或者提供百度网盘链接

您好,您说的if算子是指条件语句if吗

是指转换生成onnx中存在的if分支,可以通过开源可视化工具netron进行查看-