0
$\begingroup$

I am training a DNN with CNN in Keras. Though, I can write an EarlyStopping criteria based on val_loss but due to minor oscillations in the val_loss, I want to monitor the average validation loss over last n epoches and with n patience.

How can I do this in Keras?

$\endgroup$

1 Answer 1

0
$\begingroup$

You can always write a custom callback inheriting the tf.keras.callbacks.Callback() class. You would need to override the on_epoch_end() method with your custom logic.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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