pytorch 模型转onnx时,把torch.nn.functional.interpolate函数转成了Resize ,然后使用atc工具进行转化的时候报错:
ATC run failed, Please check the detail log, Try 'atc --help' for more information
E10042: [PID: 39712] 2024-12-17-08:08:46.904.822 GenerateOfflineModel execute failed.
TraceBack (most recent call last):
Input format not support[FUNC:ResizeNearestInferShape][FILE:image_ops.cc][LINE:3162]
Call InferShapeAndType for node:PartitionedCall_/Resize_Resize_419(Resize) failed[FUNC:Infer][FILE:infershape_pass.cc][LINE:117]
process pass InferShapePass on node:PartitionedCall_/Resize_Resize_419 failed, ret:4294967295[FUNC:RunPassesOnNode][FILE:base_pass.cc][LINE:563]
build graph failed, graph id:0, ret:1343242270[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615]
GenerateOfflineModel execute failed.
使用的转化命令:
atc --model=/root/zpq/a2f.onnx --framework=5 --output=a2f --input_shape="input1:1,29333" --soc_version Ascend310P3
torch 代码:
x= F.interpolate(outputs.transpose(1, 2), size=55, align_corners=True, mode='linear')
outputs 的shape为torch.Size([1, 91, 768])
转化成onnx的信息如下:
%/Resize_output_0 = Resize[coordinate_transformation_mode = 'align_corners', cubic_coeff_a = -0.75, mode = 'linear', nearest_mode = 'floor'](%/Transpose_output_0, %, %, %/Concat_1_output_0)
opset_version=12
请问大神们这个问题怎么解决
pytorch 模型转onnx时,把torch.nn.functional.interpolate函数转成了Resize ,然后使用atc工具进行转化的时候报错:
ATC run failed, Please check the detail log, Try 'atc --help' for more information
E10042: [PID: 39712] 2024-12-17-08:08:46.904.822 GenerateOfflineModel execute failed.
TraceBack (most recent call last):
Input format not support[FUNC:ResizeNearestInferShape][FILE:image_ops.cc][LINE:3162]
Call InferShapeAndType for node:PartitionedCall_/Resize_Resize_419(Resize) failed[FUNC:Infer][FILE:infershape_pass.cc][LINE:117]
process pass InferShapePass on node:PartitionedCall_/Resize_Resize_419 failed, ret:4294967295[FUNC:RunPassesOnNode][FILE:base_pass.cc][LINE:563]
build graph failed, graph id:0, ret:1343242270[FUNC:BuildModelWithGraphId][FILE:ge_generator.cc][LINE:1615]
GenerateOfflineModel execute failed.
使用的转化命令:
atc --model=/root/zpq/a2f.onnx --framework=5 --output=a2f --input_shape="input1:1,29333" --soc_version Ascend310P3
torch 代码:
x= F.interpolate(outputs.transpose(1, 2), size=55, align_corners=True, mode='linear')
outputs 的shape为torch.Size([1, 91, 768])
转化成onnx的信息如下:
%/Resize_output_0 = Resize[coordinate_transformation_mode = 'align_corners', cubic_coeff_a = -0.75, mode = 'linear', nearest_mode = 'floor'](%/Transpose_output_0, %, %, %/Concat_1_output_0)
opset_version=12
请问大神们这个问题怎么解决