import tensorflow as tf

    self.summary_writer.add_summary(summary, global_step=self.get_past_epochs())

  def _add_decoding_summary(self, name, var, collection='train'):
    var = var[:FLAGS.visualiza_max]
    var = tf.concat(tf.unstack(var), axis=0)
    var = tf.expand_dims(var, dim=0)
    color_s = tf.summary.image(name, var[..., :3], max_outputs=FLAGS.visualiza_max)
    var = tf.expand_dims(var[..., 3], dim=3)
    bw_s = tf.summary.image('depth_' + name, var, max_outputs=FLAGS.visualiza_max)
    return tf.summary.merge([color_s, bw_s])


