class_docstr: Stats logging object useful for gathering statistics of training
  a deep network in PyTorch.
  
  Example:
      ```
      # Init stats structure that logs statistics 'objective' and 'top1e'.
      stats = Stats( ('objective','top1e') )
  
      network = init_net()  # init a pytorch module (=neural network)
      dataloader = init_dataloader()  # init a dataloader
  
      for epoch in range(10):
  
          # start of epoch -> call new_epoch
          stats.new_epoch()
  
          # Iterate over batches.
          for batch in dataloader:
              # Run a model and save into a dict of output variables "output"
              output = network(batch)
  
              # stats.update() automatically parses the 'objective' and 'top1e'
              # from the "output" dict and stores this into the db.
              stats.update(output)
              stats.print() # prints the averages over given epoch
  
          # Stores the training plots into '/tmp/epoch_stats.pdf'
          # and plots into a visdom server running at localhost (if running).
          stats.plot_stats(plot_file='/tmp/epoch_stats.pdf')
      ```
docstr: Called before an epoch to clear current epoch buffers.
docstr_tok: ["Called","before","an","epoch","to","clear","current","epoch","buffers","."]
code: def reset(self) -> None:
      """
      Called before an epoch to clear current epoch buffers.
      """
      stat_sets = list(self.stats.keys())
      if self.verbose:
          print("stats: epoch %d - reset" % self.epoch)
      self.it = {k: -1 for k in stat_sets}
      for stat_set in stat_sets:
          for stat in self.stats[stat_set]:
              self.stats[stat_set][stat].reset()
  
      # Set a new timestamp.
      self._epoch_start = time.time()
  
imports: import time
  import warnings
  from itertools import cycle
  from typing import List, Optional
  import matplotlib
  import matplotlib.pyplot
  import numpy
  from matplotlib import colors
  from visdom import Visdom
label_desc: Use image node_id 2 for calling the Stats obj's underlying member method code with example usage: obj.reset() without return types