提交 25422ba5 编写于 作者: G gaotingquan 提交者: Tingquan Gao

fix: save latest model every epoch

上级 08ef5b54
...@@ -308,14 +308,14 @@ class Engine(object): ...@@ -308,14 +308,14 @@ class Engine(object):
self.output_dir, self.output_dir,
model_name=self.config["Arch"]["name"], model_name=self.config["Arch"]["name"],
prefix="epoch_{}".format(epoch_id)) prefix="epoch_{}".format(epoch_id))
# save the latest model # save the latest model
save_load.save_model( save_load.save_model(
self.model, self.model,
self.optimizer, {"metric": acc, self.optimizer, {"metric": acc,
"epoch": epoch_id}, "epoch": epoch_id},
self.output_dir, self.output_dir,
model_name=self.config["Arch"]["name"], model_name=self.config["Arch"]["name"],
prefix="latest") prefix="latest")
if self.vdl_writer is not None: if self.vdl_writer is not None:
self.vdl_writer.close() self.vdl_writer.close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册