code: def exponential_decay(
      initial_value,
      reduction_freq,
      reduction_rate,
      staircase=False,
      start_iter=0,
      name="step",
  ):
      """
      Applies exponential decay to the learning rate. This function is a
      wrapper for the tensorflow's ``exponential_decay`` function.
  
      .. math::
          \\alpha_{t + 1} = \\alpha_{0} \\cdot d^{\\frac{t}{r}}
  
      where :math:`\\alpha` is a step, :math:`t` is an iteration number,
      :math:`d` is a ``reduction_freq`` and :math:`r` is a ``reduction_rate``.
  
      .. code-block:: python
  
          step = initial_value * reduction_rate ^ (
              current_iteration / reduction_freq)
  
      When ``staircase=True`` the :math:`\\frac{t}{r}` value will be
      rounded.
  
      .. code-block:: python
  
          step = initial_value * reduction_rate ^ floor(
              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.
  
      reduction_freq : int
          Parameter controls step reduction frequency. The larger the
          value the slower step parameter decreases.
  
      reduction_rate : float
          Parameter controls step reduction rate. The larger the
          value the slower step parameter decreases.
  
      staircase : bool
           If ``True`` decay the learning rate at discrete intervals.
           Defaults to ``False``.
  
      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.exponential_decay(
      ...         initial_value=0.1,
      ...         reduction_freq=1000,
      ...         reduction_rate=0.95,
      ...     )
      ... )
      """
      step, iteration = init_variables(initial_value, start_iter, name)
      step_update = tf.train.exponential_decay(
          learning_rate=initial_value,
          global_step=iteration,
          decay_steps=reduction_freq,
          decay_rate=reduction_rate,
          staircase=staircase,
      )
  
      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 3 for calling a global function with example usage: exponential_decay(initial_value, reduction_freq, reduction_rate, staircase, start_iter, name) and returns: step