class_docstr: Accumulator for loss statistics.
  Currently calculates:
  
  * accuracy
  * perplexity
  * elapsed time
docstr: compute cross entropy
docstr_tok: ["compute","cross","entropy"]
code: def xent(self):
      """compute cross entropy"""
      return self.loss / self.n_words
  
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 6 for calling the Statistics obj's underlying member method code with example usage: obj.xent() and returns: unknown