提交 3de7b734 编写于 作者: S SunAhong1993

fix the interpolate

上级 e725aa37
...@@ -4512,21 +4512,6 @@ def aten_upsample_bilinear2d(mapper, graph, node): ...@@ -4512,21 +4512,6 @@ def aten_upsample_bilinear2d(mapper, graph, node):
current_outputs, scope_name) current_outputs, scope_name)
layer_inputs["align_corners"] = inputs_name[2] layer_inputs["align_corners"] = inputs_name[2]
current_inputs.append(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["align_mode"] = 0
layer_attrs["mode"] = string("bilinear") layer_attrs["mode"] = string("bilinear")
graph.add_layer( graph.add_layer(
...@@ -4592,7 +4577,6 @@ def aten_upsample_nearest2d(mapper, graph, node): ...@@ -4592,7 +4577,6 @@ def aten_upsample_nearest2d(mapper, graph, node):
block = PaddleGraph(source_type="pytorch", parent_layer=if_layer, graph_type="dygraph") block = PaddleGraph(source_type="pytorch", parent_layer=if_layer, graph_type="dygraph")
if_layer.add_block(block) if_layer.add_block(block)
if_layer.inputs["input-0"] = inputs_name[1] if_layer.inputs["input-0"] = inputs_name[1]
layer_inputs["scale_factor"] = inputs_name[3]
layer_attrs["align_mode"] = 0 layer_attrs["align_mode"] = 0
layer_attrs["mode"] = string("nearest") layer_attrs["mode"] = string("nearest")
graph.add_layer( graph.add_layer(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册