fluid.Trainer对象无法加载保存的参数
Created by: ChuRao
fluid.Trainer对象无法加载保存的参数,该对象的__init__方法下这一段代码
if param_path and os.path.isdir(param_path):
# load params from param_path into scope
io.load_persistables(
executor=exe,
dirname=param_path,
main_program=self.startup_program)
是否应该是
with self._prog_and_scope_guard():
if param_path and os.path.isdir(param_path):
# load params from param_path into scope
io.load_persistables(
executor=exe,
dirname=param_path,
main_program=self.startup_program)