guides/writing_your_own_callbacks.py/EarlyStoppingAtMinLoss/on_train_begin
class EarlyStoppingAtMinLoss:    def on_train_begin(self, logs=None):
        # The number of epoch it has waited when loss is no longer minimum.
        self.wait = 0
        # The epoch the training stops at.
        self.stopped_epoch = 0
        # Initialize the best as infinity.
        self.best = np.Inf