提交 ed806788 编写于 作者: K kinghuin 提交者: wuzewu

fix checkpoint problem caused by small dataset (#162)

* fix checkpoint problem caused by small dataset
上级 9c0d8bfd
......@@ -588,13 +588,13 @@ class BasicTask(object):
run_states = self._run(do_eval=do_eval)
self.env.current_epoch += 1
# Save checkpoint after finetune
self.save_checkpoint()
# Final evaluation
if self._base_data_reader.get_dev_examples() != []:
self.eval(phase="dev")
if self._base_data_reader.get_test_examples() != []:
self.eval(phase="test", load_best_model=True)
# Save checkpoint after finetune
self.save_checkpoint()
self._finetune_end_event(run_states)
return run_states
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册