From 367a2b07db9b9d143189c2711132f8120120c66f Mon Sep 17 00:00:00 2001 From: wjj19950828 Date: Mon, 7 Mar 2022 20:51:37 +0800 Subject: [PATCH] fixed pad op --- x2paddle/op_mapper/onnx2paddle/opset9/opset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py index db5530e..c9d2e93 100755 --- a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py @@ -630,7 +630,7 @@ class OpSet9(): layer_attrs["pad"] = paddings paddle_op = "custom_layer:PadAllDim4WithOneInput" else: - pad_data = node.get_attr('pads') + pad_data = pads pad_data1 = pad_data[0::2] pad_data_all = [] for i in range(len(pad_data1)): -- GitLab