class_docstr: Trigger invoked when specific value becomes best.
  
  Args:
      key (str): Key of value.
      compare (callable): Compare function which takes current best value and
          new value and returns whether new value is better than current
          best.
      trigger: Trigger that decides the comparison interval between current
          best value and new value. This must be a tuple in the form of
          ``<int>, 'epoch'`` or ``<int>, 'iteration'`` which is passed to
          :class:`~chainer.training.triggers.IntervalTrigger`.
class_docstr_tok: ["Trigger","invoked","when","specific","value","becomes","best",".","Args",":","key","(","str",")",":","Key","of","value",".","compare","(","callable",")",":","Compare","function","which","takes","current","best","value","and","new","value","and","returns","whether","new","value","is","better","than","current","best",".","trigger",":","Trigger","that","decides","the","comparison","interval","between","current","best","value","and","new","value",".","This","must","be","a","tuple","in","the","form","of","``","<","int",">",",","'epoch","'","``","or","``","<","int",">",",","'iteration","'","``","which","is","passed","to",":","class",":","`","~chainer.training.triggers.IntervalTrigger","`","."]
docstr: Decides whether the extension should be called on this iteration.
  
  Args:
      trainer (~chainer.training.Trainer): Trainer object that this
          trigger is associated with. The ``observation`` of this trainer
          is used to determine if the trigger should fire.
  
  Returns:
      bool: ``True`` if the corresponding extension should be invoked in
      this iteration.
docstr_tok: ["Decides","whether","the","extension","should","be","called","on","this","iteration",".","Args",":","trainer","(","~chainer.training.Trainer",")",":","Trainer","object","that","this","trigger","is","associated","with",".","The","``","observation","``","of","this","trainer","is","used","to","determine","if","the","trigger","should","fire",".","Returns",":","bool",":","``","True","``","if","the","corresponding","extension","should","be","invoked","in","this","iteration","."]
code: def __call__(self, trainer):
      """Decides whether the extension should be called on this iteration.
  
      Args:
          trainer (~chainer.training.Trainer): Trainer object that this
              trigger is associated with. The ``observation`` of this trainer
              is used to determine if the trigger should fire.
  
      Returns:
          bool: ``True`` if the corresponding extension should be invoked in
          this iteration.
  
      """
  
      observation = trainer.observation
      summary = self._summary
      key = self._key
      if key in observation:
          summary.add({key: observation[key]})
  
      if not self._interval_trigger(trainer):
          return False
  
      stats = summary.compute_mean()
      value = float(stats[key])  # copy to CPU
      self._init_summary()
  
      if self._best_value is None or self._compare(
          self._best_value, value
      ):
          self._best_value = value
          return True
      return False
  
file_path: chainer/chainer/training/triggers/minmax_value_trigger.py
imports: from chainer import reporter
  from chainer.training import util
label_desc: Use image node_id 2 for calling the BestValueTrigger obj's underlying member method code with example usage: obj.__call__(trainer) and returns: False, False, True