diff --git a/x2paddle/decoder/onnx_decoder.py b/x2paddle/decoder/onnx_decoder.py index db4ed90ba33d1aa819c0973e76a3df15f13688dc..7b9aebd75c40bada423cf43658ffb23db6a66026 100755 --- a/x2paddle/decoder/onnx_decoder.py +++ b/x2paddle/decoder/onnx_decoder.py @@ -583,6 +583,9 @@ class ONNXDecoder(object): 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]