diff --git a/x2paddle/op_mapper/tf_op_mapper.py b/x2paddle/op_mapper/tf_op_mapper.py index 371409508ad156ea30d97746f2900dfbf2995dd9..45276113e358187a79aeef98f4bf423448b2c530 100644 --- a/x2paddle/op_mapper/tf_op_mapper.py +++ b/x2paddle/op_mapper/tf_op_mapper.py @@ -297,10 +297,6 @@ class TFOpMapper(OpMapper): perm = perm.value.tolist() if perm == [0, 3, 1, 2] and input.data_format == "NHWC": - # node.fluid_code.add_layer("assign", - # inputs=input, - # output=node, - # param_attr=None) input_name = input.layer_name if hasattr(input, "index"): input_name = input_name + "[{}]".format(input.index) @@ -1006,20 +1002,6 @@ class TFOpMapper(OpMapper): output=node, param_attr=attr) - -# def FloorDiv(self, node): -# x = self.graph.get_node(node.layer.input[0], copy=True) -# y = self.graph.get_node(node.layer.input[1], copy=True) -# inputs = {'x': x, 'y': y} -# node.fluid_code.add_layer("elementwise_div", -# inputs=inputs, -# output=node, -# param_attr=None) -# node.fluid_code.add_layer("floor", -# inputs=node, -# output=node, -# param_attr=None) - def Split(self, node): dim = self.graph.get_node(node.layer.input[0], copy=True) input = self.graph.get_node(node.layer.input[1], copy=True) diff --git a/x2paddle/op_mapper/tf_op_mapper_nhwc.py b/x2paddle/op_mapper/tf_op_mapper_nhwc.py index eccbb44d8b2c45401bcdff48323d4c5f3283c9b6..fc3e43682fc2b59c6ed27556e474509667c9b55a 100644 --- a/x2paddle/op_mapper/tf_op_mapper_nhwc.py +++ b/x2paddle/op_mapper/tf_op_mapper_nhwc.py @@ -852,8 +852,6 @@ class TFOpMapperNHWC(OpMapper): input = self.graph.get_node(node.layer.input[0], copy=True) begin = self.graph.get_node(node.layer.input[1], copy=True) size = self.graph.get_node(node.layer.input[2], copy=True) - # assert begin.layer_type == "Const" - # assert size.layer_type == "Const" self.add_omit_nodes(begin.layer_name, node.layer_name) self.add_omit_nodes(size.layer_name, node.layer_name) if begin.layer_type == "Const":