'Constructs a set of summaries for this component.
Returns:
List of Summary ops to get parameter norms, progress reports, and
so forth for this component.'

def get_summaries(self):

    def combine_norm(matrices):
        squares = [tf.reduce_sum(tf.square(m)) for m in matrices if (m is not None)]
        if squares:
            return tf.sqrt(tf.add_n(squares))
        else:
            return tf.constant(0, tf.float32)
    summaries = []
    summaries.append(tf.summary.scalar(('%s    step' % self.name), self._step))
    summaries.append(tf.summary.scalar(('%s    total' % self.name), self._total))
    if self.network.params:
        summaries.append(tf.summary.scalar(('%s    parameter    Norm' % self.name), combine_norm(self.network.params)))
        slot_names = self.master.optimizer.get_slot_names()
        for name in slot_names:
            slot_params = [self.master.optimizer.get_slot(p, name) for p in self.network.params]
            summaries.append(tf.summary.scalar(('%s    %s    Norm' % (self.name, name)), combine_norm(slot_params)))
        if self.master.hyperparams.use_moving_average:
            summaries.append(tf.summary.scalar(('%s    avg    Norm' % self.name), combine_norm([self.moving_average.average(p) for p in self.network.params])))
    return summaries
