diff --git a/RELEASE.md b/RELEASE.md index 5490fa143a1d9104ca8f072832b683c227d83147..35f1710b127ea1013f04df72e85c10aad4c205ac 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,15 @@ +# `v1.5.4` + +* 修复Fine-tune中断,checkpoint文件恢复训练失败的问题 + +# `v1.5.3` + +* 优化口罩模型输出结果,提供更加灵活的部署及调用方式 + +# `v1.5.2` + +* 优化pyramidbox_lite_server_mask、pyramidbox_lite_mobile_mask模型的服务化部署性能 + # `v1.5.1` * 修复加载module缺少cache目录的问题 diff --git a/paddlehub/finetune/task/base_task.py b/paddlehub/finetune/task/base_task.py index 9ce64d6d23e3db5b2c5508f0b253dced741e5da6..f24f20e9afbdb017e2ca2aa88b0724eb7e5cbfde 100644 --- a/paddlehub/finetune/task/base_task.py +++ b/paddlehub/finetune/task/base_task.py @@ -807,10 +807,16 @@ class BaseTask(object): # NOTE: current saved checkpoint machanism is not completed, # it can't restore dataset training status def save_checkpoint(self): + """ + save the program of the last step in training + """ model_saved_dir = os.path.join(self.config.checkpoint_dir, "step_%d" % self.current_step) + 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( checkpoint_dir=self.config.checkpoint_dir, current_epoch=self.current_epoch,