code: def step_decay(
      initial_value, reduction_freq, start_iter=0, name="step"
  ):
      """
      Algorithm minimizes learning step monotonically after
      each iteration.
  
      .. math::
          \\alpha_{t + 1} = \\frac{\\alpha_{0}}{1 + \\frac{t}{m}}
  
      where :math:`\\alpha` is a step, :math:`t` is an iteration number
      and :math:`m` is a ``reduction_freq`` parameter.
  
      .. code-block:: python
  
          step = initial_value / (1 + current_iteration / reduction_freq)
  
      Notes
      -----
      Step will be reduced faster when you have smaller training batches.
  
      Parameters
      ----------
      initial_value : float
          Initial value for the learning rate. It's the learning rate
          returned during the first iteration.
  
      reduction_freq : int
          Parameter controls step reduction frequency. The larger the
          value the slower step parameter decreases.
  
          For instance, if ``reduction_freq=100``
          and ``step=0.12`` then after ``100`` iterations ``step`` is
          going to be equal to ``0.06`` (which is ``0.12 / 2``),
          after ``200`` iterations ``step`` is going to be equal to
          ``0.04`` (which is ``0.12 / 3``) and so on.
  
      start_iter : int
          Start iteration. At has to be equal to ``0`` when network just
          started the training. Defaults to ``0``.
  
      name : str
          Learning rate's variable name. Defaults to ``step``.
  
      Examples
      --------
      >>> from neupy import algorithms
      >>> from neupy.layers import *
      >>>
      >>> optimizer = algorithms.Momentum(
      ...     Input(5) >> Relu(10) >> Sigmoid(1),
      ...     step=algorithms.step_decay(
      ...         initial_value=0.1,
      ...         reduction_freq=100,
      ...     )
      ... )
      """
      step, iteration = init_variables(initial_value, start_iter, name)
      reduction_freq = asfloat(reduction_freq)
  
      step_update = initial_value / (1 + iteration / reduction_freq)
      updated_step = step.assign(step_update)
      tf.add_to_collection(tf.GraphKeys.UPDATE_OPS, updated_step)
  
      with tf.control_dependencies([updated_step]):
          next_iteration = iteration.assign(iteration + 1)
          tf.add_to_collection(tf.GraphKeys.UPDATE_OPS, next_iteration)
  
      return step
  
imports: import tensorflow
  from neupy.utils import asfloat, function_name_scope
label_desc: Use image node_id 2 for calling a global function with example usage: step_decay(initial_value, reduction_freq, start_iter, name) and returns: step