From e3de1fa3c90fec5203504c693ad9a5fbbee4c57e Mon Sep 17 00:00:00 2001 From: WJJ1995 Date: Wed, 15 Dec 2021 13:58:53 +0800 Subject: [PATCH] Support for pose_landmarks (#716) * fixed split bug * fixed concat bug * fixed node_name bugs * fixed node_name bugs * fixed CI bugs --- x2paddle/decoder/onnx_decoder.py | 2 ++ x2paddle/op_mapper/onnx2paddle/opset9/opset.py | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x2paddle/decoder/onnx_decoder.py b/x2paddle/decoder/onnx_decoder.py index db361db..ae3e61e 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 55ec32e..988e553 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) -- GitLab