code: def log_value(self, tag, val, desc=''):
      
      logging.info('%s (%s): %.4f' % (desc, tag, val))
      self.summary.value.add(tag=tag, simple_value=val)
docs: Log values to standard output and Tensorflow summary.
  
      :param tag: summary tag.
      :param val: (required float or numpy array) value to be logged.
      :param desc: (optional) additional description to be printed.