def learning_rate_decay(step, init_lr=5e-4, decay_steps=100000, decay_rate=0.1):
  """Continuous learning rate decay function.

  The computation for learning rate is lr = (init_lr * decay_rate**(step /
  decay_steps))

  Args:
    step: int, the global optimization step.
    init_lr: float, the initial learning rate.
    decay_steps: int, the decay steps, please see the learning rate computation
      above.
    decay_rate: float, the decay rate, please see the learning rate computation
      above.

  Returns:
    lr: the learning for global step 'step'.
  """
  power = step / decay_steps
  return init_lr * (decay_rate**power)