使用Mindspore官网https://www.mindspore.cn/tutorials/application/zh-CN/r2.3.0rc2/cv/resnet50.html 完成图像分类ResNet 50任务
随后完成模型ckpt -> onnx 模型转换
Mindspore 环境版本:2.2.14 CANN版本:7.0.0
最后使用CANN ATC工具尝试om模型转换,指令如下:
atc --input_shape="x:1,3,32,32" --input_fp16_nodes="x" --input_format=NCHW --output="/home/xiaoyu/Ascend/model/om_model" --soc_version=Ascend310B4 --framework=5 --model="/home/xiaoyu/Ascend/model/ResNet_batch_1.onnx"
随后出现报错:
E50029: The op[45Conv] input parameter[pads] should be [positive], actual the input is [-1, 0, -1, 0]
TraceBack (most recent call last):
pads should be positive, actual is [-1,0,-1,0].[FUNC:CheckNegativePadConv2d][FILE:nn_calculation_ops.cc][LINE:5146]
The op[45Conv] input parameter[pads] should be [positive], actual the input is [-1, 0, -1, 0]
Call InferShapeAndType for node:45Conv(Conv2D) failed[FUNC:Infer][FILE:infershape_pass.cc][LINE:119]
process pass InferShapePass on node:45Conv failed, ret:4294967295[FUNC:RunPassesOnNode][FILE:base_pass.cc][LINE:571]
build graph failed, graph id:0, ret:1343242270[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615]
GenerateOfflineModel execute failed.
这似乎是再告诉我CONV45层的padding是使用-1自动填充,但我查询了45conv发现不是,只是简单的下采样和通道变换,参数如下:
(0): Conv2d<input_channels=256, output_channels=512,
kernel_size=(1, 1), stride=(2, 2),
pad_mode=same, padding=0,
使用Mindspore官网https://www.mindspore.cn/tutorials/application/zh-CN/r2.3.0rc2/cv/resnet50.html 完成图像分类ResNet 50任务
随后完成模型ckpt -> onnx 模型转换
Mindspore 环境版本:2.2.14 CANN版本:7.0.0
最后使用CANN ATC工具尝试om模型转换,指令如下:
atc --input_shape="x:1,3,32,32" --input_fp16_nodes="x" --input_format=NCHW --output="/home/xiaoyu/Ascend/model/om_model" --soc_version=Ascend310B4 --framework=5 --model="/home/xiaoyu/Ascend/model/ResNet_batch_1.onnx"
随后出现报错:
E50029: The op[45Conv] input parameter[pads] should be [positive], actual the input is [-1, 0, -1, 0]
TraceBack (most recent call last):
pads should be positive, actual is [-1,0,-1,0].[FUNC:CheckNegativePadConv2d][FILE:nn_calculation_ops.cc][LINE:5146]
The op[45Conv] input parameter[pads] should be [positive], actual the input is [-1, 0, -1, 0]
Call InferShapeAndType for node:45Conv(Conv2D) failed[FUNC:Infer][FILE:infershape_pass.cc][LINE:119]
process pass InferShapePass on node:45Conv failed, ret:4294967295[FUNC:RunPassesOnNode][FILE:base_pass.cc][LINE:571]
build graph failed, graph id:0, ret:1343242270[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615]
GenerateOfflineModel execute failed.
这似乎是再告诉我CONV45层的padding是使用-1自动填充,但我查询了45conv发现不是,只是简单的下采样和通道变换,参数如下:
(0): Conv2d<input_channels=256, output_channels=512,
kernel_size=(1, 1), stride=(2, 2),
pad_mode=same, padding=0,