title: How we can define Early Stopping for Keras to check after each batch (not entire epoch)
body: <p>Normally Early stopping for Keras can be defined to check if it reaches a limit (loss, accuracy) after each epoch. But in mini batch method each epoch contains multiple loss, acc for training and validation phase. How we can tell Keras to check every acc or loss in an epoch for early stopping? </p>
  
  <pre><code>filepath="weights.best.hdf5"
  
  checkpoint = ModelCheckpoint(filepath, monitor='acc', verbose=1, save_best_only=True)
  
  early_stop = EarlyStopping(monitor='acc', patience=5) 
  
  callbacks_list = [checkpoint, early_stop]
  
  history = model.fit(x, y, validation_data=(x_test, y_test), epochs=1, callbacks=callbacks_list)
  </code></pre>