title: how to stop training if the sparse_validation_accuracy is higher than a baseline?
body: <p>I am fitting a <code>huggingface</code> model and trying to set up an early stopping when the <code>sparse_validation_accuracy</code> is better than 95%.</p>
  <p>I am using the following call:</p>
  <pre><code>early_stopper = tf.keras.callbacks.EarlyStopping(monitor='accuracy', 
                                                   baseline = 0.90,
                                                   patience = 0,
                                                   restore_best_weights=True)
  
  # train the model 
  model.fit(train_dataset.shuffle(len(x_train)).batch(BATCH_SIZE),
            epochs=N_EPOCHS,
            batch_size=BATCH_SIZE,
            callbacks = [early_stopper])
  </code></pre>
  <p>Unfortunately, the model keeps training as shown below. Am I missing something?</p>
  <pre><code>0.9688WARNING:tensorflow:Callbacks method `on_train_batch_end` is slow compared to the batch time (batch time: 0.6875s vs `on_train_batch_end` time: 1.1250s). Check your callbacks.
    73/7495 [..............................] - ETA: 3:43:56 - loss: 0.1147 - sparse_categorical_accuracy: 0.9546
  </code></pre>