diff --git a/x2paddle/decoder/onnx_decoder.py b/x2paddle/decoder/onnx_decoder.py index db361db2838ea79e9ad84d345a9260b6cac36503..ae3e61e3e069f15457f75cfddef7395fdc67cc92 100755 --- a/x2paddle/decoder/onnx_decoder.py +++ b/x2paddle/decoder/onnx_decoder.py @@ -583,6 +583,8 @@ class ONNXDecoder(object): item.name = self.make_variable_name(item.name) for node in graph.node: node.name = node.output[0] + if ":" in node.name and len(node.output) > 1: + node.name = node.name.split(':')[0] node.name = self.make_variable_name(node.name) for i in range(len(node.input)): if node.input[i] == '': diff --git a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py index 55ec32ee3fa841c4ee8e152ed284052f33bdbb41..988e55383659dd25d69f2255fe5467c01f45925f 100755 --- a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py @@ -1366,8 +1366,6 @@ class OpSet9(): val_x = self.graph.get_input_node(node, idx=0, copy=True) paddle_op = 'split' split = node.get_attr('split') - if split is None: - split = len(node.outputs) axis = node.get_attr('axis', 0) if split is None: split_num = len(node.layer.output)