From e130bf375235cf349904c433f3ff1c1c99f12083 Mon Sep 17 00:00:00 2001 From: tangwei12 Date: Fri, 18 May 2018 23:28:46 +0800 Subject: [PATCH] optimize python checkpint dir config --- .../paddle/fluid/transpiler/distribute_transpiler.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/python/paddle/fluid/transpiler/distribute_transpiler.py b/python/paddle/fluid/transpiler/distribute_transpiler.py index dc9d254fa55..1d51ed45792 100644 --- a/python/paddle/fluid/transpiler/distribute_transpiler.py +++ b/python/paddle/fluid/transpiler/distribute_transpiler.py @@ -543,6 +543,11 @@ class DistributeTranspiler: serial_number = self._get_lastest_checkpoint_dir(self.checkpoint_dir) + startup_prog.global_block().create_var( + name=SERIAL_VAR_NAME, + persistable=True, + type=core.VarDesc.VarType.RAW) + startup_prog.global_block().append_op( type="checkpoint_load", inputs={"X": load_vars}, @@ -612,6 +617,11 @@ class DistributeTranspiler: serial_number = self._get_lastest_checkpoint_dir(self.checkpoint_dir) + s_prog.global_block().create_var( + name=SERIAL_VAR_NAME, + persistable=True, + type=core.VarDesc.VarType.RAW) + s_prog.global_block().append_op( type="checkpoint_load", inputs={"X": load_vars}, -- GitLab