Saves scalar value.

    Args:
      tag: str: label for this data
      value: int/float: number to log
      step: int: training step

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(onp.array(value))
    if step is None:
      step = self._step
    else:
      self._step = step
    summary = Summary(value=[Summary.Value(tag=tag, simple_value=value)])
    self.add_summary(summary, step)