prdwb/bert_hae

Early stopping

Closed this issue · 2 comments

Hi !
First, thank you for this great model! i'am wondering how can i add early stopping support in your model? I have a training set, a validation set and a test set, I want to train on the training set, do early stopping with the validation set and get predictions on the test set.

prdwb commented

Since this model does training and evaluation in an alternating way, I guess you can check the validation F1 at the end of each evaluation stage and decide whether to stop training. See

bert_hae/hae.py

Line 336 in d5fc14d

val_f1 = val_eval_res['f1']

Thanks.

OK thanks!