From 5810c70aff07205c01168a1cb0e9495226f66deb Mon Sep 17 00:00:00 2001 From: mamingjie-China <52770436+mamingjie-China@users.noreply.github.com> Date: Tue, 10 Sep 2019 14:34:36 +0800 Subject: [PATCH] Update tf_op_mapper.py --- x2paddle/op_mapper/tf_op_mapper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x2paddle/op_mapper/tf_op_mapper.py b/x2paddle/op_mapper/tf_op_mapper.py index 5453184..73b0da5 100644 --- a/x2paddle/op_mapper/tf_op_mapper.py +++ b/x2paddle/op_mapper/tf_op_mapper.py @@ -785,6 +785,9 @@ class TFOpMapper(OpMapper): start = self.graph.get_node(node.layer.input[0], copy=True) limit = self.graph.get_node(node.layer.input[1], copy=True) delta = self.graph.get_node(node.layer.input[2], copy=True) + self.add_omit_nodes(start.layer_name, node.layer_name) + self.add_omit_nodes(limit.layer_name, node.layer_name) + self.add_omit_nodes(delta.layer_name, node.layer_name) if start.layer_type == "Const": start = start.value else: @@ -797,9 +800,6 @@ class TFOpMapper(OpMapper): delta = delta.value else: delta = self.decoder.infer_tensor(delta) - self.add_omit_nodes(start.layer_name, node.layer_name) - self.add_omit_nodes(limit.layer_name, node.layer_name) - self.add_omit_nodes(delta.layer_name, node.layer_name) inputs = {"start": start, "end": limit, "step": delta} attr = {"dtype": string(node.dtype)} -- GitLab