get_summary

tflearn.summaries.get_summary (stype, tag, value=None, collection_key=None, break_if_exists=False)

Create or retrieve a summary. It keep tracks of all graph summaries through summary_tags collection. If a summary tags already exists, it will return that summary tensor or raise an error (according to 'break_if_exists').

Arguments

  • stype: str. Summary type: 'histogram', 'scalar' or 'image'.
  • tag: str. The summary tag (name).
  • value: Tensor. The summary initialization value. Default: None.
  • collection_key: str. If specified, the created summary will be added to that collection (optional).
  • break_if_exists: bool. If True, if a summary with same tag already exists, it will raise an exception (instead of returning that existing summary).

Returns

The summary Tensor.


add_activations_summary

tflearn.summaries.add_activations_summary (activation_ops, name_prefix='', name_suffix='', collection_key=None)

Add histogram summary for given activations.

Arguments

  • activation_ops: A list of Tensor. The activations to summarize.
  • name_prefix: str. A prefix to add to summary scope.
  • name_suffix: str. A suffix to add to summary scope.
  • collection_key: str. A collection to store the summaries.

Returns

The list of created activation summaries.


add_gradients_summary

tflearn.summaries.add_gradients_summary (grads, name_prefix='', name_suffix='', collection_key=None)

Add histogram summary for given gradients.

Arguments

  • grads: A list of Tensor. The gradients to summarize.
  • name_prefix: str. A prefix to add to summary scope.
  • name_suffix: str. A suffix to add to summary scope.
  • collection_key: str. A collection to store the summaries.

Returns

The list of created gradient summaries.


add_trainable_vars_summary

tflearn.summaries.add_trainable_vars_summary (variables, name_prefix='', name_suffix='', collection_key=None)

Add histogram summary for given variables weights.

Arguments

  • variables: A list of Variable. The variables to summarize.
  • name_prefix: str. A prefix to add to summary scope.
  • name_suffix: str. A suffix to add to summary scope.
  • collection_key: str. A collection to store the summaries.

Returns

The list of created weights summaries.


get_value_from_summary_string

tflearn.summaries.get_value_from_summary_string (tag, summary_str)

Retrieve a summary value from a summary string.

Arguments

  • tag: str. The summary tag (name).
  • summary_str: str. The summary string to look in.

Returns

A float. The retrieved value.


add_loss_summaries

tflearn.summaries.add_loss_summaries (total_loss, loss, regul_losses_collection_key, name_prefix='', summaries_collection_key=None, exp_moving_avg=0.9, ema_num_updates=None)

Add scalar summaries (raw and averages) for given losses.

Generates moving average for all losses and associated summaries for visualizing the performance of the network.

Arguments

  • total_loss: Tensor. The total loss (Regression loss + regularization losses).
  • loss: Tensor. Regression loss.
  • name_prefix: str. A prefix to add to the summary name.
  • regul_losses_collection_key: str. A collection name to retrieve regularization losses.
  • exp_moving_avg: float. Exponential moving average.
  • ema_num_updates: int. Step to be used with exp moving avg.

Returns

loss_averages_op: op for generating moving averages of losses.


summary_exists

tflearn.summaries.summary_exists (tag)

Check if a summary exists.

Arguments

  • tag: str. The summary name.

Returns

A bool. Whether the summary exists or not.