Helper functions to summarize specific variables or ops.


Summarize an activation.

This applies the given activation and adds useful summaries specific to the activation.

  • op: The tensor to summarize (assumed to be a layer activation).

The summary op created to summarize op.

tf.contrib.layers.summarize_tensor(tensor, tag=None)

Summarize a tensor using a suitable summary type.

This function adds a summary op for tensor. The type of summary depends on the shape of tensor. For scalars, a scalar_summary is created, for all other tensors, histogram_summary is used.

  • tensor: The tensor to summarize
  • tag: The tag to use, if None then use tensor's op's name.

The summary op created or None for string tensors.

tf.contrib.layers.summarize_tensors(tensors, summarizer=summarize_tensor)

Summarize a set of tensors.

tf.contrib.layers.summarize_collection(collection, name_filter=None, summarizer=summarize_tensor)

Summarize a graph collection of tensors, possibly filtered by name.

The layers module defines convenience functions summarize_variables, summarize_weights and summarize_biases, which set the collection argument of summarize_collection to VARIABLES, WEIGHTS and BIASES, respectively.

tf.contrib.layers.summarize_activations(name_filter=None, summarizer=summarize_activation)

Summarize activations, using summarize_activation to summarize.