def exponential_decay(lr0, s):
    """
    Create exponential decay: reduce learning rate by s every specified iteration.

    Parameters
    ----------
    lr0 : float
        initial learning rate
    s: float
        decay rate, e.g. 0.9 (mostly higher than in other methods)

    Returns
    -------
    exponential_decay_fn: float
        exponential decay
    """
    def exponential_decay_fn(steps_per_epoch):
        return lr0 * 0.1**(steps_per_epoch / s)
    return exponential_decay_fn