def config_summary(self, name):
    summarys = []
    summarys.append(tf.summary.scalar((name + '/loss'), self.loss_op))
    summarys.append(tf.summary.scalar((name + '/accuracy'), self.accuracy_op))
    if ((name == 'valid') and (self.conf.data_type == '2D')):
        summarys.append(tf.summary.image((name + '/input'), self.inputs, max_outputs=100))
        summarys.append(tf.summary.image((name + '/annotation'), tf.cast(tf.expand_dims(self.labels, (- 1)), tf.float32), max_outputs=100))
        summarys.append(tf.summary.image((name + '/prediction'), tf.cast(tf.expand_dims(self.decoded_preds, (- 1)), tf.float32), max_outputs=100))
    summary = tf.summary.merge(summarys)
    return summary
def config_summary(self, name):
    summarys = []
    summarys.append(tf.summary.scalar((name + '/loss'), self.loss_op))
    summarys.append(tf.summary.scalar((name + '/accuracy'), self.accuracy_op))
    if ((name == 'valid') and (self.conf.data_type == '2D')):
        summarys.append(tf.summary.image((name + '/input'), self.inputs, max_outputs=100))
        summarys.append(tf.summary.image((name + '/annotation'), tf.cast(tf.expand_dims(self.labels, (- 1)), tf.float32), max_outputs=100))
        summarys.append(tf.summary.image((name + '/prediction'), tf.cast(tf.expand_dims(self.decoded_preds, (- 1)), tf.float32), max_outputs=100))
    summary = tf.summary.merge(summarys)
    return summary