From 9cf47afe6154d86214b74f7082155cc3ae014ea8 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Wed, 16 May 2018 16:06:21 +0800 Subject: [PATCH] modify get trainer param --- python/paddle/fluid/transpiler/distribute_transpiler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/transpiler/distribute_transpiler.py b/python/paddle/fluid/transpiler/distribute_transpiler.py index 104e2405322..04aa51d2cdd 100644 --- a/python/paddle/fluid/transpiler/distribute_transpiler.py +++ b/python/paddle/fluid/transpiler/distribute_transpiler.py @@ -525,12 +525,15 @@ class DistributeTranspiler: if not checkpoint_load_dir: return startup_prog + load_vars = [] for var in startup_prog.list_vars(): if self.is_persistable(var): - print("var: %s" % var.name) + load_vars.append(var.name) startup_prog.global_block().append_op( - type="checkpoint_load", attrs={"dir": checkpoint_load_dir}) + type="checkpoint_load", + outputs={"Out": load_vars}, + attrs={"dir": checkpoint_load_dir}) return startup_prog def get_startup_program(self, endpoint, pserver_program): -- GitLab