提交 45b8677d 编写于 作者: Y yejianwu

fix python list shallow copy in onnx validate

上级 2b820d8b
...@@ -294,7 +294,7 @@ def validate_onnx_model(platform, device_type, model_file, ...@@ -294,7 +294,7 @@ def validate_onnx_model(platform, device_type, model_file,
input_dict[input_names[i]] = input_value input_dict[input_names[i]] = input_value
onnx_outputs = [] onnx_outputs = []
for i in range(len(output_names)): for i in range(len(output_names)):
out_shape = output_shapes[i] out_shape = output_shapes[i][:]
if output_data_formats[i] == common.DataFormat.NHWC and\ if output_data_formats[i] == common.DataFormat.NHWC and\
len(out_shape) == 4: len(out_shape) == 4:
out_shape[1], out_shape[2], out_shape[3] = \ out_shape[1], out_shape[2], out_shape[3] = \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册