From 3de7b7348f70cc54492d33c5678c19719560a51a Mon Sep 17 00:00:00 2001 From: SunAhong1993 Date: Tue, 12 Jan 2021 20:03:32 +0800 Subject: [PATCH] fix the interpolate --- .../op_mapper/dygraph/pytorch2paddle/aten.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/x2paddle/op_mapper/dygraph/pytorch2paddle/aten.py b/x2paddle/op_mapper/dygraph/pytorch2paddle/aten.py index 28c2e6a..994980f 100644 --- a/x2paddle/op_mapper/dygraph/pytorch2paddle/aten.py +++ b/x2paddle/op_mapper/dygraph/pytorch2paddle/aten.py @@ -4512,21 +4512,6 @@ def aten_upsample_bilinear2d(mapper, graph, node): current_outputs, scope_name) layer_inputs["align_corners"] = inputs_name[2] current_inputs.append(inputs_name[2]) -# # 处理输入3和4,构造assert -# list_layer_inputs = {} -# mapper._check_input(graph, inputs_node[3], inputs_name[3], current_outputs, scope_name) -# list_layer_inputs["key"] = inputs_name[3] -# current_inputs.append(inputs_name[3]) -# mapper._check_input(graph, inputs_node[4], inputs_name[4], current_outputs, scope_name) -# list_layer_inputs["value"] = inputs_name[4] -# current_inputs.append(inputs_name[4]) -# graph.add_layer( -# "prim.assert", -# inputs=list_layer_inputs, -# outputs=[output_name + "_assert"], -# scope_name=scope_name, -# type="eq") - layer_inputs["scale_factor"] = inputs_name[3] layer_attrs["align_mode"] = 0 layer_attrs["mode"] = string("bilinear") graph.add_layer( @@ -4592,7 +4577,6 @@ def aten_upsample_nearest2d(mapper, graph, node): block = PaddleGraph(source_type="pytorch", parent_layer=if_layer, graph_type="dygraph") if_layer.add_block(block) if_layer.inputs["input-0"] = inputs_name[1] - layer_inputs["scale_factor"] = inputs_name[3] layer_attrs["align_mode"] = 0 layer_attrs["mode"] = string("nearest") graph.add_layer( -- GitLab