class_docstr: Accumulator for loss statistics, inspired by ONMT.
  
  Keeps track of the following metrics:
  * F1
  * Precision
  * Recall
  * Accuracy
class_docstr_tok: ["Accumulator","for","loss","statistics",",","inspired","by","ONMT",".","Keeps","track","of","the","following","metrics",":","*","F1","*","Precision","*","Recall","*","Accuracy"]
code: def accuracy(self):
      return 100 * (self.tps + self.tns) / self.examples
  
imports: import copy
  import logging
  import sys
  import time
  import warnings
  from collections import OrderedDict
  import pandas
  import pyprind
  import torch
  from tqdm import tqdm
  from .data import MatchingIterator
  from .optim import Optimizer, SoftNLLLoss
  from .utils import tally_parameters
label_desc: Use image node_id 7 for calling the Statistics obj's underlying member method code with example usage: obj.accuracy() and returns: unknown