def step_anneal(base_lr, global_step,
                anneal_rate=0.98,
                anneal_interval=30000):
    """
    Annealing learning rate by steps

    :param base_lr: base learning rate
    :type base_lr: float
    :param global_step: global training steps
    :type global_step: int
    :param anneal_rate: rate of annealing
    :type anneal_rate: float
    :param anneal_interval: interval steps of annealing
    :type anneal_interval: int
    :return: scheduled learning rate
    :rtype: float
    """

    lr = base_lr * anneal_rate ** (global_step // anneal_interval)
    return lr