diff --git a/x2paddle/op_mapper/tf_op_mapper_nhwc.py b/x2paddle/op_mapper/tf_op_mapper_nhwc.py index 65b9c55e9f17d4f0447109384c03b21b82388850..fffa733c40ec7c43ee12de2b50a10f543659319c 100644 --- a/x2paddle/op_mapper/tf_op_mapper_nhwc.py +++ b/x2paddle/op_mapper/tf_op_mapper_nhwc.py @@ -1026,3 +1026,13 @@ class TFOpMapperNHWC(OpMapper): inputs=inputs, outputs=[node.name], **attr) + + def SquaredDifference(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.name, "y": y.name} + program.add_layer( + "fluid.layers.elementwise_sub", inputs=inputs, outputs=[node.name]) + inputs = {"x": node.name, "y": node.name} + program.add_layer( + "fluid.layers.elementwise_mul", inputs=inputs, outputs=[node.name])