How would you - on-the-fly - prevent a neural network from overfitting using a Keras callback?
Sounds like you're just looking for EarlyStopping, which will stop training when validation loss does not improve for N epochs. It's the same as Iter in catboost.