0
$\begingroup$

I want to find the optimal hyperparameter (dropout rate, learning rate, number of epochs) for training an CNN-architecture.

Does it make sense to integrate EarlyStopping already in GridSearchCV? Or should EarlyStopping only be used for the final model?

Can you make recommendations?

$\endgroup$
0
$\begingroup$

You likely assume that early stopping would influence the results. It is possible that early stopping would interact with other parameters (would act better for some combinations of parameters, then for others). So it makes sense to integrate early stopping into grid search. Moreover, it would make training faster, so grid search will take faster. Additionally, you may treat enabling early stopping, or not, as additional parameter in search space and actually check if it helps.

$\endgroup$
  • $\begingroup$ Perhaps you still allow me the question of whether you know a sample code to which I can orient myself (unfortunately I´m still a beginner in ML)? Because in machinelearningmastery.com/… is GridSearchCV unfortunately demonstrated only without EarlyStopping. $\endgroup$ – Code Now Nov 15 '19 at 19:24
  • $\begingroup$ @CodeNow sorry I'm not familiar with keras sklearn API. $\endgroup$ – Tim Nov 15 '19 at 20:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.