JayYip / m3tl

BERT for Multitask Learning
https://jayyip.github.io/m3tl/
Apache License 2.0
545 stars 125 forks source link

How to use early stopping for saving the best train accuracy? #102

Open hoangthangta opened 2 years ago

hoangthangta commented 2 years ago

Hello, I am looking for a way to save the best train accuracy. The only thing I saw in the training process is this line:

model = train_bert_multitask(
        problem = problem,
        num_epochs = EPOCHS,
        problem_type_dict = problem_type_dict,
        processing_fn_dict = processing_fn_dict,
        continue_training = False,
        params = params 
    )

How to intervene to the training loop?

JayYip commented 2 years ago

You should use callbacks.