diff --git a/x2paddle/op_mapper/tf_op_mapper.py b/x2paddle/op_mapper/tf_op_mapper.py index f4dbab3aafb780b8c62fdb6ea1a99b16b38ee466..c913744d60267b15079797cfbe81921e72754f92 100644 --- a/x2paddle/op_mapper/tf_op_mapper.py +++ b/x2paddle/op_mapper/tf_op_mapper.py @@ -1122,37 +1122,6 @@ class TFOpMapper(OpMapper): output=node, param_attr=None) - def RandomUniform(self, node): - shape = self.graph.get_node(node.layer.input[0], copy=True) - self.add_omit_nodes(shape.layer_name, node.layer_name) - if shape.layer_type == "Const": - shape = shape.value.tolist() - else: - shape = self.decoder.infer_shape_tensor(shape) - if node.tf_data_format == "NHWC" and len(shape) == 4: - shape = [shape[i] for i in [0, 3, 1, 2]] - attr = {"shape": shape, "min": 0.0, "max": 0.9999} - if shape[0] < 0: - input = self.batch_node - node.fluid_code.add_layer("uniform_random_batch_size_like", - inputs=input, - output=node, - param_attr=attr) - else: - node.fluid_code.add_layer("uniform_random", - inputs=None, - output=node, - param_attr=attr) - - def GreaterEqual(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("greater_equal", - inputs=inputs, - output=node, - param_attr=None) - def RandomUniform(self, node): shape = self.graph.get_node(node.layer.input[0], copy=True) self.add_omit_nodes(shape.layer_name, node.layer_name)