diff --git a/x2paddle/op_mapper/onnx_op_mapper.py b/x2paddle/op_mapper/onnx_op_mapper.py index bfe789b11bba654924fa5ae1febb7d49c2c590bb..a2d8941a3276eb164bb496f6f0e7a6f4448265d3 100644 --- a/x2paddle/op_mapper/onnx_op_mapper.py +++ b/x2paddle/op_mapper/onnx_op_mapper.py @@ -640,13 +640,13 @@ class ONNXOpMapper(OpMapper): param_attr=attr) def Sum(self, node): - val_inps = [val for val in node.layer.input] - flag = 1 + val_inps = node.layer.input inputs = { "x": val_inps[0], "y": val_inps[1], } node.fluid_code.add_layer("elementwise_add", inputs=inputs, output=node) + for ipt in val_inps[2:]: inputs = { "x": node.layer_name,