How to combine GridSearchCV with Early Stopping?
Just to add to others here. I guess you simply need to include a early stopping callback in your fit().

Something like:

from keras.callbacks import EarlyStopping
# Define early stopping
early_stopping = EarlyStopping(monitor='val_loss', patience=epochs_to_wait_for_improve)
# Add ES into fit
history = model.fit(..., callbacks=[early_stopping])