BERT目前只有在所有训练结束后才会eval一次,
所以要把
flags.DEFINE_float("num_train_epochs", 3.0,
"Total number of training epochs to perform.")
改到比现在已训练步数小时,跑一下就可以看一次。
还要改下这个
flags.DEFINE_string(
"init_checkpoint",
default="output_dir/model.ckpt-10000",
help="Initial checkpoint (usually from a pre-trained BERT model).")
以及output_dir/checkpoint
的第一行,对应上。
或者貌似直接
flags.DEFINE_bool("do_train", False, "Whether to run training.")
flags.DEFINE_bool("do_eval", True, "Whether to run eval on the dev set.")
————
https://github.com/google-research/bert