From 5de6130e14b9ebfc7539d4d3da52438371df721f Mon Sep 17 00:00:00 2001 From: mamingjie-China Date: Sun, 19 Jul 2020 17:53:47 +0800 Subject: [PATCH] fix bug in tf_decoder --- x2paddle/decoder/tf_decoder.py | 3 +-- x2paddle/op_mapper/tf_op_mapper_nhwc.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/x2paddle/decoder/tf_decoder.py b/x2paddle/decoder/tf_decoder.py index 8ffb369..97714e8 100644 --- a/x2paddle/decoder/tf_decoder.py +++ b/x2paddle/decoder/tf_decoder.py @@ -285,7 +285,6 @@ class TFGraph(Graph): def data_format_propagation(self, node): current_node = self.node_map[node.layer_name] - current_node = node.tf_data_format outputs = current_node.outputs if len(outputs) == 0: return @@ -416,7 +415,7 @@ class TFDecoder(object): else: value = graph_node.layer.attr["shape"].shape shape = [dim.size for dim in value.dim] - self.input_info[graph_node.layer_name] = (shape, dtype) + self.input_info[layer.name] = (shape, dtype) return input_map diff --git a/x2paddle/op_mapper/tf_op_mapper_nhwc.py b/x2paddle/op_mapper/tf_op_mapper_nhwc.py index 401c9d3..2bb0ade 100644 --- a/x2paddle/op_mapper/tf_op_mapper_nhwc.py +++ b/x2paddle/op_mapper/tf_op_mapper_nhwc.py @@ -806,7 +806,7 @@ class TFOpMapperNHWC(OpMapper): "transpose", inputs=input, output=node, param_attr=attr) input = node else: - self.data_format_propagation(node) + self.graph.data_format_propagation(node) attr = { "bias_attr": False, -- GitLab