def early_stopping_check(losses, patience=5, min_delta=1e-3):
    """
        Function to check if early stopping criteria are met
        
        Args:
            losses (list): list of all losses in order of the epochs,
                these could be training or validation losses
            patience (int): the number of epochs with no improvement
                greater than `min_delta`
            min_delta (float): The smallest amount that signals  
                sufficienct decrease in validation loss to justify
                continuation of training for a further #patience
                epochs
                
        Returns:
            bool: True, if early stopping criteria are satisfied, 
                False otherwise
    """
    
    # if sufficient number of epochs have not elapsed yet
    if len(losses) <= patience:
        return False
    
    # the loss value upon which the patience check will be performed
    anchor_loss = losses[-(patience+1)]
    
    for i in range(patience):
        if (anchor_loss - losses[i-patience]) > min_delta:
            return False
    
    return True