From 35c45b33a8c1e684e230a5c81402b15b45b79c66 Mon Sep 17 00:00:00 2001 From: SunAhong1993 Date: Wed, 11 Nov 2020 12:39:15 +0800 Subject: [PATCH] remove print --- x2paddle/op_mapper/dygraph/tf2paddle/tf_op_mapper.py | 4 +--- x2paddle/optimizer/tensorflow/batch_norm.py | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/x2paddle/op_mapper/dygraph/tf2paddle/tf_op_mapper.py b/x2paddle/op_mapper/dygraph/tf2paddle/tf_op_mapper.py index f91c1a4..6ed111f 100644 --- a/x2paddle/op_mapper/dygraph/tf2paddle/tf_op_mapper.py +++ b/x2paddle/op_mapper/dygraph/tf2paddle/tf_op_mapper.py @@ -262,7 +262,7 @@ class TFOpMapper(OpMapper): else: inputs["shape"] = dims.name layer_attrs["dtype"] = string(input_value.dtype) - layer_attrs["value"] = input_value.value + layer_attrs["fill_value"] = input_value.value self.paddle_graph.add_layer( "paddle.full", @@ -1246,14 +1246,12 @@ class TFOpMapper(OpMapper): y_shape = y.out_shapes[0] layer_id = self.paddle_graph.add_layer( "paddle.fluid.layers.elementwise_sub", inputs=inputs, outputs=[node.name]) -# program.layers[layer_id].input_shapes = {"x": x_shape, "y": y_shape} inputs = {"x": node.name, "y": node.name} x_shape = node.out_shapes[0] y_shape = node.out_shapes[0] layer_id = self.paddle_graph.add_layer( "paddle.multiply", inputs=inputs, outputs=[node.name]) -# program.layers[layer_id].input_shapes = {"x": x_shape, "y": y_shape} def OneHot(self, node): input = self.graph.get_node(node.layer.input[0]) diff --git a/x2paddle/optimizer/tensorflow/batch_norm.py b/x2paddle/optimizer/tensorflow/batch_norm.py index 6b58074..3e3d813 100644 --- a/x2paddle/optimizer/tensorflow/batch_norm.py +++ b/x2paddle/optimizer/tensorflow/batch_norm.py @@ -178,4 +178,3 @@ class BatchNormOpt: graph.layers[bn.id] = bn graph.layers[transpose1.id] = transpose1 graph.build() - print("=============") -- GitLab