提交 8c6303d3 编写于 作者: S SunAhong1993

recover

上级 4a59b171
......@@ -285,14 +285,14 @@ class PaddleGraph(object):
hierarchical_tree.save_source_files(save_dir)
self.dump_dygraph_parameter(save_dir)
else:
# if self.source_type == "pytorch":
# from x2paddle.optimizer.pytorch_code_optimizer import ModuleGraph
# module_graph = ModuleGraph(self)
# module_graph.save_source_files(save_dir)
# self.dump_dygraph_parameter(save_dir)
# else:
self.gen_dygraph_code(save_dir)
self.dump_dygraph_parameter(save_dir)
if self.source_type == "pytorch":
from x2paddle.optimizer.pytorch_code_optimizer import ModuleGraph
module_graph = ModuleGraph(self)
module_graph.save_source_files(save_dir)
self.dump_dygraph_parameter(save_dir)
else:
self.gen_dygraph_code(save_dir)
self.dump_dygraph_parameter(save_dir)
# 动转静
code_path = osp.join(osp.abspath(save_dir), "x2paddle_code.py")
print("Exporting inference model from python code ('{}')... \n".format(code_path))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册