def get_step_index(curr_iter, decay_iters):
  """Get step when the learning rate is decayed.
  """
  for idx, decay_iter in enumerate(decay_iters):
    if curr_iter < decay_iter:
      return idx
  return len(decay_iters)