def lr_schedule(epoch: int, lr: float):
    """
    Scheduler function for keras callback.
    :param epoch: Epoch number.
    :param lr: Initial learning rate.
    :return: Updated LR.
    """
    if epoch < 40:
        lr_ = lr
    elif epoch < 60:
        lr_ = lr / 3
    elif epoch < 70:
        lr_ = lr / 5
    elif epoch < 80:
        lr_ = lr / 7
    elif epoch < 90:
        lr_ = lr / 9
    elif epoch < 100:
        lr_ = lr / 11
    elif epoch < 110:
        lr_ = lr / 13
    else:
        lr_ = lr / 100
    return lr_