diff --git a/x2paddle/decoder/tf_decoder.py b/x2paddle/decoder/tf_decoder.py index 8ffb369490da68ce93f0c994aadc427bcecc18ac..97714e8be6878c8dd83fb86a639fe5af414fd60e 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 401c9d33f7967db97c5b3a5a4439e18743380fec..2bb0adeac0c7cfc11030be01d7366b21cc86d6bd 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,