class_docstr: Trainer extension to change an optimizer attribute linearly.
  
  This extension changes an optimizer attribute from the first value to the
  last value linearly within a specified duration. The typical use case is
  warming up of the momentum coefficient.
  
  For example, suppose that this extension is called at every iteration, and
  ``value_range == (x, y)`` and ``time_range == (i, j)``. Then, this
  extension keeps the attribute to be ``x`` up to the ``i``-th iteration,
  linearly shifts the value to ``y`` by the ``j``-th iteration, and then
  keeps the value to be ``y`` after the ``j``-th iteration.
  
  This extension is also called before the training loop starts by default.
  
  Args:
      attr (str): Name of the optimizer attribute to adjust.
      value_range (tuple of float): The first and the last values of the
          attribute.
      time_range (tuple of ints): The first and last counts of calls in which
          the attribute is adjusted.
      optimizer (~chainer.Optimizer): Target optimizer object. If it is None,
          the main optimizer of the trainer is used.
code: def initialize(self, trainer):
      optimizer = self._get_optimizer(trainer)
      if self._last_value is not None:
          value = self._last_value
      else:
          value = self._compute_next_value()
      self._update_value(optimizer, value)
  
file_path: chainer/chainer/training/extensions/linear_shift.py
imports: from __future__ import division
  import numpy
  from chainer.training import extension
label_desc: Use image node_id 2 for calling the LinearShift obj's underlying member method code with example usage: obj.initialize(trainer) without return types