未验证 提交 97d83133 编写于 作者: S Steffy-zxf 提交者: GitHub

Fix save ckpt (#427)

上级 cfef8c27
......@@ -713,10 +713,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,
......
......@@ -13,5 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
""" PaddleHub version string """
hub_version = "1.5.2"
hub_version = "1.5.4"
module_proto_version = "1.0.0"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册