class CustomEarlyStopping(Callback):

    def __init__(self, ratio=0.0, patience=0, verbose=0):
        super(EarlyStopping, self).__init__()
Keras Callback EarlyStopping comparing training and validation loss