diff --git a/x2paddle/core/program.py b/x2paddle/core/program.py index 915d5d691b72f4d854ebfe64bd4df63d5afb4bcb..c570d5ab3485b79dd3ba8c0248365562a5931e47 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 9d6a88ff9e873b5f1d408ca9fb1c82354788c7dd..ab51e73450a9f3530fba68d499e40ab72d196a54 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 = [] # 转换输入节点