def add_activations_summary(activation_ops, name_prefix="", name_suffix="",
                            collection_key=None):

    summ = []
    for ao in activation_ops:
        ao_name = ao.op.name
        summ_name = format_scope_name(ao_name, name_prefix,
                                      "Activations/" + name_suffix)
        summ_exists = summary_exists(summ_name)
        if summ_exists is not None:
            tf.add_to_collection(collection_key, summ_exists)
        else:
            get_summary("histogram", summ_name, ao, collection_key)

        summ_name = format_scope_name(ao_name, name_prefix,
                                      "Sparsity/" + name_suffix)
        summ_exists = summary_exists(summ_name)
        if summ_exists is not None:
            tf.add_to_collection(collection_key, summ_exists)
            summ.append(summ_exists)
        else:
            summ.append(get_summary("scalar", summ_name,
                                    tf.nn.zero_fraction(ao), collection_key))
    return summ
add_activations_summary.
dataset/ETHPy150Open tflearn/tflearn/tflearn/summaries.py/add_activations_summary