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.

def log_value(self, tag, val, desc=''):
    """
    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.
    """
    logging.info('%s (%s): %.4f' % (desc, tag, val))
    self.summary.value.add(tag=tag, simple_value=val)