code: def polynomial_decay(
      initial_value,
      decay_iter,
      minstep=0.001,
      power=1.0,
      cycle=False,
      start_iter=0,
      name="step",
  ):
      """
      Applies polynomial decay to the learning rate. This function is a
      wrapper for the tensorflow's ``polynomial_decay`` function.
  
      .. code-block:: python
  
          iteration = min(current_iteration, decay_iter)
          step = minstep + (
              (initial_value - minstep) *
              (1 - iteration / decay_iter) ^ power
          )
  
      If cycle is ``True`` then a multiple of ``decay_iter`` is used,
      the first one that is bigger than ``current_iterations``.
  
      .. code-block:: python
  
          decay_iter = decay_iter * ceil(current_iteration / decay_iter)
          step = minstep + (
              (initial_value - minstep) *
              (1 - current_iteration / decay_iter) ^ power
          )
  
      Notes
      -----
      Step will be reduced faster when you have smaller training batches.
  
      Parameters
      ----------
      initial_value : float
         Initial value for the learning rate.
  
      decay_iter : int
          When ``cycle=False`` parameter identifies number of iterations
          when ``minstep`` will be reached. When ``cycle=True`` than
          the ``decay_iter`` value will be increased. See code above.
  
      minstep : float
          Step will never be lower than that minimum possible step,
          specified by this parameter. Defaults to ``0.001``.
  
      power : float
          The power of the polynomial. Defaults to ``1``.
  
      cycle : bool
          When value equal to ``True`` than step will be further reduced
          when ``current_iteration > decay_iter``. 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.polynomial_decay(
      ...         initial_value=0.1,
      ...         decay_iter=1000,
      ...         minstep=0.01,
      ...     )
      ... )
      """
      step, iteration = init_variables(initial_value, start_iter, name)
      step_update = tf.train.polynomial_decay(
          learning_rate=initial_value,
          global_step=iteration,
          decay_steps=decay_iter,
          end_learning_rate=minstep,
          power=power,
          cycle=cycle,
      )
  
      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 4 for calling a global function with example usage: polynomial_decay(initial_value, decay_iter, minstep, power, cycle, start_iter, name) and returns: step