class_docstr: Trainer extension to polynomially shift an optimizer attribute.
  
  This extension polynomially decreases the specified attribute of the
  optimizer. The typical use case is a polynomial decay of the
  learning rate at each iteration.
  
  For example, suppose that this extension is invoke at every iteration.
  Then this extension will set the corresponding attribute to
  ``init_value * (1 - i / max_iter) ^ rate`` at the ``i``-th iteration, where
  the ``max_iter`` is the number of iterations to be running.
  
  This extension is also called before the training loop starts by default.
  
  Args:
      attr (str): Name of the attribute to shift.
      rate (float): Exponent of polynomial shift.
      max_count (int): Number of this extension to be invoked.
      init (float): Initial value of the attribute. If it is ``None``, the
          extension extracts the attribute at the first call and uses it as
          the initial value.
      target (float): Target value of the attribute. If the attribute reaches
          this value, the shift stops.
      optimizer (~chainer.Optimizer): Target optimizer to adjust the
          attribute. If it is ``None``, the main optimizer of the updater is
          used.
class_docstr_tok: ["Trainer","extension","to","polynomially","shift","an","optimizer","attribute",".","This","extension","polynomially","decreases","the","specified","attribute","of","the","optimizer",".","The","typical","use","case","is","a","polynomial","decay","of","the","learning","rate","at","each","iteration",".","For","example",",","suppose","that","this","extension","is","invoke","at","every","iteration",".","Then","this","extension","will","set","the","corresponding","attribute","to","``","init_value","*","(","1","-","i","\/","max_iter",")","^","rate","``","at","the","``","i","``","-th","iteration",",","where","the","``","max_iter","``","is","the","number","of","iterations","to","be","running",".","This","extension","is","also","called","before","the","training","loop","starts","by","default",".","Args",":","attr","(","str",")",":","Name","of","the","attribute","to","shift",".","rate","(","float",")",":","Exponent","of","polynomial","shift",".","max_count","(","int",")",":","Number","of","this","extension","to","be","invoked",".","init","(","float",")",":","Initial","value","of","the","attribute",".","If","it","is","``","None","``",",","the","extension","extracts","the","attribute","at","the","first","call","and","uses","it","as","the","initial","value",".","target","(","float",")",":","Target","value","of","the","attribute",".","If","the","attribute","reaches","this","value",",","the","shift","stops",".","optimizer","(","~chainer.Optimizer",")",":","Target","optimizer","to","adjust","the","attribute",".","If","it","is","``","None","``",",","the","main","optimizer","of","the","updater","is","used","."]
code: def _get_optimizer(self, trainer):
      return self._optimizer or trainer.updater.get_optimizer("main")
  
file_path: chainer/chainer/training/extensions/polynomial_shift.py
imports: from __future__ import division
  import numpy
  from chainer.training import extension
label_desc: Use image node_id 5 for calling the PolynomialShift obj's underlying member method code with example usage: obj._get_optimizer(trainer) and returns: unknown