class_docstr: __init__(y_keys, x_key='iteration', trigger=(1, 'epoch'), postprocess=None, filename='plot.png', marker='x', grid=True)
  
  Trainer extension to output plots.
  
  This extension accumulates the observations of the trainer to
  :class:`~chainer.DictSummary` at a regular interval specified by a supplied
  trigger, and plot a graph with using them.
  
  There are two triggers to handle this extension. One is the trigger to
  invoke this extension, which is used to handle the timing of accumulating
  the results. It is set to ``1, 'iteration'`` by default. The other is the
  trigger to determine when to emit the result. When this trigger returns
  True, this extension appends the summary of accumulated values to the list
  of past summaries, and writes the list to the log file. Then, this
  extension makes a new fresh summary object which is used until the next
  time that the trigger fires.
  
  It also adds ``'epoch'`` and ``'iteration'`` entries to each result
  dictionary, which are the epoch and iteration counts at the output.
  
  .. warning::
  
      If your environment needs to specify a backend of matplotlib
      explicitly, please call ``matplotlib.use`` before calling
      ``trainer.run``. For example:
  
      .. code-block:: python
  
          import matplotlib
          matplotlib.use('Agg')
  
          trainer.extend(
              extensions.PlotReport(['main/loss', 'validation/main/loss'],
                                    'epoch', filename='loss.png'))
          trainer.run()
  
      Then, once one of instances of this extension is called,
      ``matplotlib.use`` will have no effect.
  
  For the details, please see here:
  https://matplotlib.org/faq/usage_faq.html#what-is-a-backend
  
  Args:
      y_keys (iterable of strs): Keys of values regarded as y. If this is
          ``None``, nothing is output to the graph.
      x_key (str): Keys of values regarded as x. The default value is
          'iteration'.
      trigger: Trigger that decides when to aggregate the result and output
          the values. This is distinct from the trigger of this extension
          itself. If it is a tuple in the form ``<int>, 'epoch'`` or ``<int>,
          'iteration'``, it is passed to :class:`IntervalTrigger`.
      postprocess: Callback to postprocess the result dictionaries. Figure
          object, Axes object, and all plot data are passed to this callback
          in this order. This callback can modify the figure.
      filename (str): Name of the figure file under the output directory.
          It can be a format string.
          For historical reasons ``file_name`` is also accepted as an alias
          of this argument.
      marker (str): The marker used to plot the graph. Default is ``'x'``. If
          ``None`` is given, it draws with no markers.
      grid (bool): If ``True``, set the axis grid on.
          The default value is ``True``.
class_docstr_tok: ["__init__","(","y_keys",",","x_key='iteration","'",",","trigger=","(","1",",","'epoch","'",")",",","postprocess=None",",","filename='plot.png","'",",","marker=","'","x","'",",","grid=True",")","Trainer","extension","to","output","plots",".","This","extension","accumulates","the","observations","of","the","trainer","to",":","class",":","`","~chainer.DictSummary","`","at","a","regular","interval","specified","by","a","supplied","trigger",",","and","plot","a","graph","with","using","them",".","There","are","two","triggers","to","handle","this","extension",".","One","is","the","trigger","to","invoke","this","extension",",","which","is","used","to","handle","the","timing","of","accumulating","the","results",".","It","is","set","to","``","1",",","'iteration","'","``","by","default",".","The","other","is","the","trigger","to","determine","when","to","emit","the","result",".","When","this","trigger","returns","True",",","this","extension","appends","the","summary","of","accumulated","values","to","the","list","of","past","summaries",",","and","writes","the","list","to","the","log","file",".","Then",",","this","extension","makes","a","new","fresh","summary","object","which","is","used","until","the","next","time","that","the","trigger","fires",".","It","also","adds","``","'epoch","'","``","and","``","'iteration","'","``","entries","to","each","result","dictionary",",","which","are","the","epoch","and","iteration","counts","at","the","output",".","..","warning",":",":","If","your","environment","needs","to","specify","a","backend","of","matplotlib","explicitly",",","please","call","``","matplotlib.use","``","before","calling","``","trainer.run","``",".","For","example",":","..","code-block",":",":","python","import","matplotlib","matplotlib.use","(","'Agg","'",")","trainer.extend","(","extensions.PlotReport","(","[","'main\/loss","'",",","'validation\/main\/loss","'","]",",","'epoch","'",",","filename='loss.png","'",")",")","trainer.run","(",")","Then",",","once","one","of","instances","of","this","extension","is","called",",","``","matplotlib.use","``","will","have","no","effect",".","For","the","details",",","please","see","here",":","https",":","\/\/matplotlib.org\/faq\/usage_faq.html","#","what-is-a-backend","Args",":","y_keys","(","iterable","of","strs",")",":","Keys","of","values","regarded","as","y",".","If","this","is","``","None","``",",","nothing","is","output","to","the","graph",".","x_key","(","str",")",":","Keys","of","values","regarded","as","x",".","The","default","value","is","'iteration","'",".","trigger",":","Trigger","that","decides","when","to","aggregate","the","result","and","output","the","values",".","This","is","distinct","from","the","trigger","of","this","extension","itself",".","If","it","is","a","tuple","in","the","form","``","<","int",">",",","'epoch","'","``","or","``","<","int",">",",","'iteration","'","``",",","it","is","passed","to",":","class",":","`","IntervalTrigger","`",".","postprocess",":","Callback","to","postprocess","the","result","dictionaries",".","Figure","object",",","Axes","object",",","and","all","plot","data","are","passed","to","this","callback","in","this","order",".","This","callback","can","modify","the","figure",".","filename","(","str",")",":","Name","of","the","figure","file","under","the","output","directory",".","It","can","be","a","format","string",".","For","historical","reasons","``","file_name","``","is","also","accepted","as","an","alias","of","this","argument",".","marker","(","str",")",":","The","marker","used","to","plot","the","graph",".","Default","is","``","'","x","'","``",".","If","``","None","``","is","given",",","it","draws","with","no","markers",".","grid","(","bool",")",":","If","``","True","``",",","set","the","axis","grid","on",".","The","default","value","is","``","True","``","."]
code: def _init_summary(self):
      self._summary = reporter.DictSummary()
  
file_path: chainer/chainer/training/extensions/plot_report.py
imports: import json
  from os import path
  import warnings
  import numpy
  import six
  from chainer import reporter
  from chainer import serializer
  from chainer.training import extension
  from chainer.training import trigger
  from chainer.utils import argument
label_desc: Use image node_id 5 for calling the PlotReport obj's underlying member method code with example usage: obj._init_summary() without return types