提交 955f7660 编写于 作者: W wuzewu

Merge branch 'release/v1.5' into release/v1.6

# `v1.5.4`
* 修复Fine-tune中断,checkpoint文件恢复训练失败的问题
# `v1.5.3`
* 优化口罩模型输出结果,提供更加灵活的部署及调用方式
# `v1.5.2`
* 优化pyramidbox_lite_server_mask、pyramidbox_lite_mobile_mask模型的服务化部署性能
# `v1.5.1` # `v1.5.1`
* 修复加载module缺少cache目录的问题 * 修复加载module缺少cache目录的问题
......
...@@ -807,10 +807,16 @@ class BaseTask(object): ...@@ -807,10 +807,16 @@ class BaseTask(object):
# NOTE: current saved checkpoint machanism is not completed, # NOTE: current saved checkpoint machanism is not completed,
# it can't restore dataset training status # it can't restore dataset training status
def save_checkpoint(self): def save_checkpoint(self):
"""
save the program of the last step in training
"""
model_saved_dir = os.path.join(self.config.checkpoint_dir, model_saved_dir = os.path.join(self.config.checkpoint_dir,
"step_%d" % self.current_step) "step_%d" % self.current_step)
logger.info("Saving model checkpoint to {}".format(model_saved_dir)) logger.info("Saving model checkpoint to {}".format(model_saved_dir))
self.save_inference_model(dirname=model_saved_dir) # to resume traning by loading ckpt, it must be save program (save_persistables)
fluid.io.save_persistables(
self.exe, dirname=model_saved_dir, main_program=self.main_program)
save_checkpoint( save_checkpoint(
checkpoint_dir=self.config.checkpoint_dir, checkpoint_dir=self.config.checkpoint_dir,
current_epoch=self.current_epoch, current_epoch=self.current_epoch,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册