From 30e2faee9b6457fe7afe043193a2459f7f2d7859 Mon Sep 17 00:00:00 2001 From: wjj19950828 Date: Thu, 23 Jun 2022 21:31:59 +0800 Subject: [PATCH] fixed rename bug --- x2paddle/decoder/onnx_decoder.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x2paddle/decoder/onnx_decoder.py b/x2paddle/decoder/onnx_decoder.py index db4ed90..7b9aebd 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] -- GitLab