class_docstr: Accumulator for loss statistics.
  Currently calculates:
  
  * accuracy
  * perplexity
  * elapsed time
code: def __init__(
      self,
      loss=0,
      n_batchs=0,
      n_sents=0,
      n_words=0,
      n_correct=0,
      computed_metrics={},
  ):
      self.loss = loss
      self.n_batchs = n_batchs
      self.n_sents = n_sents
      self.n_words = n_words
      self.n_correct = n_correct
      self.n_src_words = 0
      self.computed_metrics = computed_metrics
      self.start_time = time.time()
  
file_path: OpenNMT-py/onmt/utils/statistics.py
imports: import time
  import math
  import sys
  from onmt.utils.logging import logger
label_desc: Use image node_id 1 to create a new Statistics object from inherited base classes: object with example: obj = Statistics(loss, n_batchs, n_sents, n_words, n_correct, computed_metrics)