I want to optimize the hyperparams for a CNN-architecture by using GridSearchCV. As hyperparameters to optimize, I would like to use the learning rate, dropout rate, number of neurons in den dense layer and the number of epochs. For the training of the final Model with the optimized hyperparams, I would like to use EarlyStopping to counteract overfitting. And here is my problem, I am not sure if it would still be advisable to use a search range for number of epochs in GridSearchCV at all, or whether I should simply use a fixed number of epochs to determine the remaining hyperparams with GridSearch?
What are your opinions and recommendations?
Thanks in advance