From a4056d9c061dafe002058931e06321d4cd75de29 Mon Sep 17 00:00:00 2001 From: SunAhong1993 Date: Fri, 21 Aug 2020 11:22:24 +0800 Subject: [PATCH] modify graph_type --- x2paddle/core/program.py | 2 +- x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x2paddle/core/program.py b/x2paddle/core/program.py index 915d5d6..c570d5a 100644 --- a/x2paddle/core/program.py +++ b/x2paddle/core/program.py @@ -59,7 +59,7 @@ class PaddleLayer(object): class PaddleGraph(object): - def __init__(self, parent_layer=None, graph_type="dygraph"): + def __init__(self, parent_layer=None, graph_type="static"): self.layers = OrderedDict() self.edges_out = dict() self.edges_in = dict() diff --git a/x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py b/x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py index 9d6a88f..ab51e73 100644 --- a/x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py +++ b/x2paddle/op_mapper/pytorch2paddle/pytorch_op_mapper.py @@ -71,7 +71,7 @@ class PyTorchOpMapper(OpMapper): current_node_outputs.extend(outputs) # 初始化 - graph = PaddleGraph(parent_layer) + graph = PaddleGraph(parent_layer, graph_type="dygraph") current_node_outputs = [] graph_inputs = [] # 转换输入节点 -- GitLab