models/dense_net.py
def log_loss_accuracy(self, loss, accuracy, epoch, prefix,
                          should_print=True):
        """
        Writes a log of the current mean loss (cross_entropy) and accuracy.

        Args:
            loss: `float`, loss (cross_entropy) for the current log;
            accuracy: `float`, accuracy for the current log;
            epoch: `int`, current training epoch (or batch);
            prefix: `str`, is this log for a batch ('per_batch'), a
                training epoch ('train') or a validation epoch ('valid');
            should_print: `bool`, should we print this log on console or not.
        """
        if should_print:
            print("mean cross_entropy: %f, mean accuracy: %f" % (
                loss, accuracy))
        summary = tf.Summary(value=[
            tf.Summary.Value(
                tag='loss_%s' % prefix, simple_value=float(loss)),
            tf.Summary.Value(
                tag='accuracy_%s' % prefix, simple_value=float(accuracy))
        ])
        self.summary_writer.add_summary(summary, epoch)

        Writes a log of the current mean loss (cross_entropy) and accuracy.

        Args:
            loss: `float`, loss (cross_entropy) for the current log;
            accuracy: `float`, accuracy for the current log;
            epoch: `int`, current training epoch (or batch);
            prefix: `str`, is this log for a batch ('per_batch'), a
                training epoch ('train') or a validation epoch ('valid');
            should_print: `bool`, should we print this log on console or not.
        
Writes a log of the current mean loss (cross_entropy) and accuracy.
Writes a log of the current mean loss ( cross_entropy ) and accuracy .
def log_loss_accuracy(self, loss, accuracy, epoch, prefix,
                          should_print=True):
        if should_print:
            print("mean cross_entropy: %f, mean accuracy: %f" % (
                loss, accuracy))
        summary = tf.Summary(value=[
            tf.Summary.Value(
                tag='loss_%s' % prefix, simple_value=float(loss)),
            tf.Summary.Value(
                tag='accuracy_%s' % prefix, simple_value=float(accuracy))
        ])
        self.summary_writer.add_summary(summary, epoch)
def log_loss_accuracy ( self , loss , accuracy , epoch , prefix , should_print = True ) : if should_print : print ( "mean cross_entropy: %f, mean accuracy: %f" % ( loss , accuracy ) ) summary = tf . Summary ( value = [ tf . Summary . Value ( tag = 'loss_%s' % prefix , simple_value = float ( loss ) ) , tf . Summary . Value ( tag = 'accuracy_%s' % prefix , simple_value = float ( accuracy ) ) ] ) self . summary_writer . add_summary ( summary , epoch )
Writes a log of the current mean loss (cross_entropy) and accuracy.
Writes a log of the current mean loss ( cross_entropy ) and accuracy .
"""
        Writes a log of the current mean loss (cross_entropy) and accuracy.

        Args:
            loss: `float`, loss (cross_entropy) for the current log;
            accuracy: `float`, accuracy for the current log;
            epoch: `int`, current training epoch (or batch);
            prefix: `str`, is this log for a batch ('per_batch'), a
                training epoch ('train') or a validation epoch ('valid');
            should_print: `bool`, should we print this log on console or not.
        """
self
loss
`float`, loss (cross_entropy) for the current log.
` float ` loss ( cross_entropy ) for the current log .
accuracy
`float`, accuracy for the current log.
` float ` accuracy for the current log .
epoch
`int`, current training epoch (or batch).
` int ` current training epoch ( or batch ) .
prefix
`str`, is this log for a batch ('per_batch'), a
training epoch ('train') or a validation epoch ('valid').
` str ` is this log for a batch ( ' per_batch ' ) a training epoch ( ' train ' ) or a validation epoch ( ' valid ' ) .
should_print
`bool`, should we print this log on console or not.
` bool ` should we print this log on console or not .