提交 5e4fbfb4 编写于 作者: C chengmo

fix load

上级 9f8abe91
......@@ -38,11 +38,9 @@ class StartupBase(object):
if dirname is None or dirname == "":
return
print("going to load ", dirname)
if is_fleet:
context["fleet"].load_persistables(context["exe"], dirname)
else:
fluid.io.load_persistables(
context["exe"], dirname, main_program=main_program)
fluid.io.load_persistables(
context["exe"], dirname, main_program=main_program)
print("load from {} success".format(dirname))
class SingleStartup(StartupBase):
......@@ -81,7 +79,6 @@ class PSStartup(StartupBase):
"startup_program"]
with fluid.program_guard(train_prog, startup_prog):
context["exe"].run(startup_prog)
self.load(context, True)
context["status"] = "train_pass"
......@@ -99,7 +96,7 @@ class CollectiveStartup(StartupBase):
"startup_program"]
with fluid.program_guard(train_prog, startup_prog):
context["exe"].run(startup_prog)
self.load(context, True)
self.load(context, main_program=train_prog)
context["status"] = "train_pass"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册