class_docstr: Trigger invoked when key value getting bigger or lower than before.
  
  Args:
      key (str) : Key of value.
      compare_fn ((float, float) -> bool) : Function to compare the values.
      trigger (tuple(int, str)) : Trigger that decide the comparison interval.
class_docstr_tok: ["Trigger","invoked","when","key","value","getting","bigger","or","lower","than","before",".","Args",":","key","(","str",")",":","Key","of","value",".","compare_fn","(","(","float",",","float",")","-",">","bool",")",":","Function","to","compare","the","values",".","trigger","(","tuple","(","int",",","str",")",")",":","Trigger","that","decide","the","comparison","interval","."]
code: def __init__(self, key, compare_fn, trigger=(1, "epoch")):
      from chainer import training
  
      self._key = key
      self._best_value = None
      self._interval_trigger = training.util.get_trigger(trigger)
      self._init_summary()
      self._compare_fn = compare_fn
  
imports: import argparse
  import copy
  import json
  import logging
  import os
  import shutil
  import tempfile
  import numpy
  import torch
label_desc: Use image node_id 1 to create a new CompareValueTrigger object from inherited base classes: object with example: obj = CompareValueTrigger(key, compare_fn, trigger)