class_docstr: Statistics of some scalar tensor.
  The value will be averaged over all given datapoints.
  
  Note that the average of accuracy over all batches is not necessarily the
  accuracy of the whole dataset. See :class:`ClassificationError` for details.
docstr: Args:
      names(list or str): list of names or just one name. The
          corresponding tensors have to be scalar.
      prefix(str): a prefix for logging
code: def __init__(self, names, prefix="validation"):
      """
      Args:
          names(list or str): list of names or just one name. The
              corresponding tensors have to be scalar.
          prefix(str): a prefix for logging
      """
      if not isinstance(names, list):
          self.names = [names]
      else:
          self.names = names
      self.prefix = prefix
  
imports: import numpy
  from abc import ABCMeta
  import six
  from ..tfutils.common import get_op_tensor_name
  from ..utils import logger
  from ..utils.stats import BinaryStatistics, RatioCounter
  from .base import Callback
label_desc: Use image node_id 1 to create a new ScalarStats object from inherited base classes: Inferencer with example: obj = ScalarStats(names, prefix)