(self, tag, value, step=None)
Saves scalar value.

    Args:
      tag: str: label for this data
      value: int/float: number to log
      step: int: training step
Saves scalar value.
Saves scalar value .
def scalar(self, tag, value, step=None):
    """Saves scalar value.

    Args:
      tag: str: label for this data
      value: int/float: number to log
      step: int: training step
    """
    value = float(np.array(value))
    if step is None:
      step = self._step
    else:
      self._step = step
    summary = tf.compat.v1.Summary(
        value=[tf.compat.v1.Summary.Value(tag=tag, simple_value=value)])
    self.add_summary(summary, step)
def scalar ( self , tag , value , step = None ) : value = float ( np . array ( value ) ) if step is None : step = self . _step else : self . _step = step summary = tf . compat . v1 . Summary ( value = [ tf . compat . v1 . Summary . Value ( tag = tag , simple_value = value ) ] ) self . add_summary ( summary , step )