From 6af98dc465b6dfecf63fef54f1cc8b570fea14cd Mon Sep 17 00:00:00 2001 From: wjj19950828 Date: Wed, 29 Dec 2021 10:47:28 +0800 Subject: [PATCH] remove LSTM useless code --- x2paddle/op_mapper/onnx2paddle/opset9/opset.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py index 873c823..17cbbab 100755 --- a/x2paddle/op_mapper/onnx2paddle/opset9/opset.py +++ b/x2paddle/op_mapper/onnx2paddle/opset9/opset.py @@ -2306,20 +2306,10 @@ class OpSet9(): if input_nums > 5 and node.layer.input[5] != '': init_h = self.graph.get_input_node( node, idx=exist_input_nums, copy=True) - self.paddle_graph.add_layer( - 'paddle.reshape', - inputs={"x": init_h.name}, - outputs=[init_h.name], - shape=init_h.out_shapes[0]) exist_input_nums += 1 if input_nums > 6 and node.layer.input[6] != '': init_c = self.graph.get_input_node( node, idx=exist_input_nums, copy=True) - self.paddle_graph.add_layer( - 'paddle.reshape', - inputs={"x": init_c.name}, - outputs=[init_c.name], - shape=init_c.out_shapes[0]) input_weight_np = _const_weight_or_none(input_weight) _rename_or_remove_weight(self.weights, input_weight.name) -- GitLab