<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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)