diff --git a/x2paddle/decoder/onnx_decoder.py b/x2paddle/decoder/onnx_decoder.py index db4ed90ba..7b9aebd75 100755 --- a/x2paddle/decoder/onnx_decoder.py +++ b/x2paddle/decoder/onnx_decoder.py @@ -583,6 +583,9 @@ def optimize_node_name(self, model): item.name = self.make_variable_name(item.name) for node in graph.node: node.name = node.output[0] + # Avoid topological sort errors caused by :: in the name + if "::" in node.name and len(node.output) > 1: + node.name = node.name.replace('::', '_') if ":" in node.name and len( node.output) > 1 and node.op_type != "LSTM": node.name = node.name.split(':')[0]