onnx转om失败:blocksize, specifying the size of the spatial block, should be >=2
收藏回复举报
onnx转om失败:blocksize, specifying the size of the spatial block, should be >=2
t('forum.solved') 已解决
发表于2023-02-27 14:41:42
0 查看

 转换日志和模型如下:

链接:https://pan.baidu.com/s/1oGLJZsgvflrFlugwamlmaw?pwd=9t83  

提取码:9t83  

CANN:6.0.0.alpha003 硬件型号:A300I(3000)。onnx 经过测试可正常使用。

输入是(1,3,416,416)的图片,这可能帮助你们复现。

转换时报错如下:

ATC start working now, please wait for a moment.
ATC run failed, Please check the detail log, Try 'atc --help' for more information
E79999: Inner Error!
E79999  onnx_plugin op_name[/outconv/proj/proj.1/DepthToSpace], blocksize, specifying the size of the spatial block, should be >=2, [FUNC:ParseParamsDepthToSpace][FILE:depth_to_space_plugin.cc][LINE:35]
        Model parse to graph failed, graph name:UNet.[FUNC:ModelParseToGraph][FILE:onnx_parser.cc][LINE:905]
        ATC model parse ret fail.[FUNC:ParseGraph][FILE:omg.cc][LINE:788]
        Solution: Please contact support engineer.

转换时使用命令如下:

atc --input_shape="modelInput:1,3,416,416" --input_format=NCHW --output=./UNet --soc_version=Ascend310 --insert_op_conf=./insert_op.cfg --framework=5 --save_original_model=false --model=/root/om_convert/416UNet.onnx  --log=debug

insert_op.cfg内容如下:

aipp_op {
	related_input_rank : 0
	src_image_size_w : 416
	src_image_size_h : 416
	crop : false
	input_format : YUV420SP_U8
	aipp_mode: static
	csc_switch : true
	rbuv_swap_switch : false
	matrix_r0c0 : 298
	matrix_r0c1 : 0
	matrix_r0c2 : 409
	matrix_r1c0 : 298
	matrix_r1c1 : -100
	matrix_r1c2 : -208
	matrix_r2c0 : 298
	matrix_r2c1 : 516
	matrix_r2c2 : 0
	input_bias_0 : 16
	input_bias_1 : 128
	input_bias_2 : 128
	mean_chn_0 : 0
	mean_chn_1 : 0
	mean_chn_2 : 0
	min_chn_0 : 0.0
	min_chn_1 : 0.0
	min_chn_2 : 0.0
	var_reci_chn_0 : 0.003922
	var_reci_chn_1 : 0.003922
	var_reci_chn_2 : 0.003922
}

我要发帖子