Type tf.summary
Namespace tensorflow
Methods
- all_v2_summary_ops
- all_v2_summary_ops_dyn
- audio
- audio
- audio_dyn
- create_file_writer
- create_noop_writer
- create_noop_writer_dyn
- flush
- flush
- get_summary_description
- get_summary_description_dyn
- histogram
- histogram
- image
- image
- image
- image
- image
- image
- image_dyn
- initialize
- merge
- merge_all
- merge_all_dyn
- merge_dyn
- record_if
- record_if
- record_if
- record_if_dyn
- scalar
- scalar
- tensor_summary
- tensor_summary_dyn
- text
- text_dyn
- trace_export
- trace_export
- trace_export_dyn
- trace_off
- trace_off_dyn
- trace_on
- trace_on_dyn
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write
- write_dyn
Properties
Public static methods
object all_v2_summary_ops()
Returns all V2-style summary ops defined in the current default graph. This includes ops from TF 2.0 tf.summary and TF 1.x tf.contrib.summary (except
for
tf.contrib.summary.graph
and tf.contrib.summary.import_event
), but
does *not* include TF 1.x tf.summary ops.
Returns
-
object
- List of summary ops, or None if called under eager execution.
object all_v2_summary_ops_dyn()
Returns all V2-style summary ops defined in the current default graph. This includes ops from TF 2.0 tf.summary and TF 1.x tf.contrib.summary (except
for
tf.contrib.summary.graph
and tf.contrib.summary.import_event
), but
does *not* include TF 1.x tf.summary ops.
Returns
-
object
- List of summary ops, or None if called under eager execution.
Tensor audio(string name, IGraphNodeBase tensor, int sample_rate, int max_outputs, object collections, string family)
Outputs a `Summary` protocol buffer with audio. The summary has up to `max_outputs` summary values containing audio. The
audio is built from `tensor` which must be 3-D with shape `[batch_size,
frames, channels]` or 2-D with shape `[batch_size, frames]`. The values are
assumed to be in the range of `[-1.0, 1.0]` with a sample rate of
`sample_rate`. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/audio'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/audio/0', '*name*/audio/1', etc
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IGraphNodeBase
tensor - A 3-D `float32` `Tensor` of shape `[batch_size, frames, channels]` or a 2-D `float32` `Tensor` of shape `[batch_size, frames]`.
-
int
sample_rate - A Scalar `float32` `Tensor` indicating the sample rate of the signal in hertz.
-
int
max_outputs - Max number of batch elements to generate audio for.
-
object
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor audio(string name, IGraphNodeBase tensor, double sample_rate, int max_outputs, object collections, string family)
Outputs a `Summary` protocol buffer with audio. The summary has up to `max_outputs` summary values containing audio. The
audio is built from `tensor` which must be 3-D with shape `[batch_size,
frames, channels]` or 2-D with shape `[batch_size, frames]`. The values are
assumed to be in the range of `[-1.0, 1.0]` with a sample rate of
`sample_rate`. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/audio'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/audio/0', '*name*/audio/1', etc
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IGraphNodeBase
tensor - A 3-D `float32` `Tensor` of shape `[batch_size, frames, channels]` or a 2-D `float32` `Tensor` of shape `[batch_size, frames]`.
-
double
sample_rate - A Scalar `float32` `Tensor` indicating the sample rate of the signal in hertz.
-
int
max_outputs - Max number of batch elements to generate audio for.
-
object
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
object audio_dyn(object name, object tensor, object sample_rate, ImplicitContainer<T> max_outputs, object collections, object family)
Outputs a `Summary` protocol buffer with audio. The summary has up to `max_outputs` summary values containing audio. The
audio is built from `tensor` which must be 3-D with shape `[batch_size,
frames, channels]` or 2-D with shape `[batch_size, frames]`. The values are
assumed to be in the range of `[-1.0, 1.0]` with a sample rate of
`sample_rate`. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/audio'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/audio/0', '*name*/audio/1', etc
Parameters
-
object
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
object
tensor - A 3-D `float32` `Tensor` of shape `[batch_size, frames, channels]` or a 2-D `float32` `Tensor` of shape `[batch_size, frames]`.
-
object
sample_rate - A Scalar `float32` `Tensor` indicating the sample rate of the signal in hertz.
-
ImplicitContainer<T>
max_outputs - Max number of batch elements to generate audio for.
-
object
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
object
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
object
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
ResourceSummaryWriter create_file_writer(IGraphNodeBase logdir, Nullable<int> max_queue, Nullable<int> flush_millis, string filename_suffix, string name)
NoopSummaryWriter create_noop_writer()
object create_noop_writer_dyn()
object flush(SummaryWriter writer, string name)
object flush(IGraphNodeBase writer, string name)
object get_summary_description(object node_def)
Given a TensorSummary node_def, retrieve its SummaryDescription. When a Summary op is instantiated, a SummaryDescription of associated
metadata is stored in its NodeDef. This method retrieves the description.
Parameters
-
object
node_def - the node_def_pb2.NodeDef of a TensorSummary op
Returns
-
object
- a summary_pb2.SummaryDescription
object get_summary_description_dyn(object node_def)
Given a TensorSummary node_def, retrieve its SummaryDescription. When a Summary op is instantiated, a SummaryDescription of associated
metadata is stored in its NodeDef. This method retrieves the description.
Parameters
-
object
node_def - the node_def_pb2.NodeDef of a TensorSummary op
Returns
-
object
- a summary_pb2.SummaryDescription
Tensor histogram(string name, IEnumerable<IGraphNodeBase> values, object collections, string family)
Outputs a `Summary` protocol buffer with a histogram. Adding a histogram summary makes it possible to visualize your data's
distribution in TensorBoard. You can see a detailed explanation of the
TensorBoard histogram dashboard
[here](https://www.tensorflow.org/get_started/tensorboard_histograms). The generated
[`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto)
has one summary value containing a histogram for `values`. This op reports an `InvalidArgument` error if any value is not finite.
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IEnumerable<IGraphNodeBase>
values - A real numeric `Tensor`. Any shape. Values to use to build the histogram.
-
object
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor histogram(string name, object values, object collections, string family)
Outputs a `Summary` protocol buffer with a histogram. Adding a histogram summary makes it possible to visualize your data's
distribution in TensorBoard. You can see a detailed explanation of the
TensorBoard histogram dashboard
[here](https://www.tensorflow.org/get_started/tensorboard_histograms). The generated
[`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto)
has one summary value containing a histogram for `values`. This op reports an `InvalidArgument` error if any value is not finite.
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
object
values - A real numeric `Tensor`. Any shape. Values to use to build the histogram.
-
object
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor image(int name, IDictionary<object, object> tensor, int max_outputs, IEnumerable<object> collections, string family)
Outputs a `Summary` protocol buffer with images. The summary has up to `max_outputs` summary values containing images. The
images are built from `tensor` which must be 4-D with shape `[batch_size,
height, width, channels]` and where `channels` can be: * 1: `tensor` is interpreted as Grayscale.
* 3: `tensor` is interpreted as RGB.
* 4: `tensor` is interpreted as RGBA. The images have the same number of channels as the input tensor. For float
input, the values are normalized one image at a time to fit in the range
`[0, 255]`. `uint8` values are unchanged. The op uses two different
normalization algorithms: * If the input values are all positive, they are rescaled so the largest one
is 255. * If any input value is negative, the values are shifted so input value 0.0
is at 127. They are then rescaled so that either the smallest value is 0,
or the largest one is 255. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/image'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/image/0', '*name*/image/1', etc.
Parameters
-
int
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IDictionary<object, object>
tensor - A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, width, channels]` where `channels` is 1, 3, or 4.
-
int
max_outputs - Max number of batch elements to generate images for.
-
IEnumerable<object>
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor image(string name, IEnumerable<SparseTensor> tensor, int max_outputs, IEnumerable<object> collections, string family)
Outputs a `Summary` protocol buffer with images. The summary has up to `max_outputs` summary values containing images. The
images are built from `tensor` which must be 4-D with shape `[batch_size,
height, width, channels]` and where `channels` can be: * 1: `tensor` is interpreted as Grayscale.
* 3: `tensor` is interpreted as RGB.
* 4: `tensor` is interpreted as RGBA. The images have the same number of channels as the input tensor. For float
input, the values are normalized one image at a time to fit in the range
`[0, 255]`. `uint8` values are unchanged. The op uses two different
normalization algorithms: * If the input values are all positive, they are rescaled so the largest one
is 255. * If any input value is negative, the values are shifted so input value 0.0
is at 127. They are then rescaled so that either the smallest value is 0,
or the largest one is 255. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/image'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/image/0', '*name*/image/1', etc.
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IEnumerable<SparseTensor>
tensor - A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, width, channels]` where `channels` is 1, 3, or 4.
-
int
max_outputs - Max number of batch elements to generate images for.
-
IEnumerable<object>
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor image(string name, IDictionary<object, object> tensor, int max_outputs, IEnumerable<object> collections, string family)
Outputs a `Summary` protocol buffer with images. The summary has up to `max_outputs` summary values containing images. The
images are built from `tensor` which must be 4-D with shape `[batch_size,
height, width, channels]` and where `channels` can be: * 1: `tensor` is interpreted as Grayscale.
* 3: `tensor` is interpreted as RGB.
* 4: `tensor` is interpreted as RGBA. The images have the same number of channels as the input tensor. For float
input, the values are normalized one image at a time to fit in the range
`[0, 255]`. `uint8` values are unchanged. The op uses two different
normalization algorithms: * If the input values are all positive, they are rescaled so the largest one
is 255. * If any input value is negative, the values are shifted so input value 0.0
is at 127. They are then rescaled so that either the smallest value is 0,
or the largest one is 255. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/image'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/image/0', '*name*/image/1', etc.
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IDictionary<object, object>
tensor - A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, width, channels]` where `channels` is 1, 3, or 4.
-
int
max_outputs - Max number of batch elements to generate images for.
-
IEnumerable<object>
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor image(int name, IGraphNodeBase tensor, int max_outputs, IEnumerable<object> collections, string family)
Outputs a `Summary` protocol buffer with images. The summary has up to `max_outputs` summary values containing images. The
images are built from `tensor` which must be 4-D with shape `[batch_size,
height, width, channels]` and where `channels` can be: * 1: `tensor` is interpreted as Grayscale.
* 3: `tensor` is interpreted as RGB.
* 4: `tensor` is interpreted as RGBA. The images have the same number of channels as the input tensor. For float
input, the values are normalized one image at a time to fit in the range
`[0, 255]`. `uint8` values are unchanged. The op uses two different
normalization algorithms: * If the input values are all positive, they are rescaled so the largest one
is 255. * If any input value is negative, the values are shifted so input value 0.0
is at 127. They are then rescaled so that either the smallest value is 0,
or the largest one is 255. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/image'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/image/0', '*name*/image/1', etc.
Parameters
-
int
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IGraphNodeBase
tensor - A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, width, channels]` where `channels` is 1, 3, or 4.
-
int
max_outputs - Max number of batch elements to generate images for.
-
IEnumerable<object>
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor image(int name, IEnumerable<SparseTensor> tensor, int max_outputs, IEnumerable<object> collections, string family)
Outputs a `Summary` protocol buffer with images. The summary has up to `max_outputs` summary values containing images. The
images are built from `tensor` which must be 4-D with shape `[batch_size,
height, width, channels]` and where `channels` can be: * 1: `tensor` is interpreted as Grayscale.
* 3: `tensor` is interpreted as RGB.
* 4: `tensor` is interpreted as RGBA. The images have the same number of channels as the input tensor. For float
input, the values are normalized one image at a time to fit in the range
`[0, 255]`. `uint8` values are unchanged. The op uses two different
normalization algorithms: * If the input values are all positive, they are rescaled so the largest one
is 255. * If any input value is negative, the values are shifted so input value 0.0
is at 127. They are then rescaled so that either the smallest value is 0,
or the largest one is 255. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/image'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/image/0', '*name*/image/1', etc.
Parameters
-
int
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IEnumerable<SparseTensor>
tensor - A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, width, channels]` where `channels` is 1, 3, or 4.
-
int
max_outputs - Max number of batch elements to generate images for.
-
IEnumerable<object>
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor image(string name, IGraphNodeBase tensor, int max_outputs, IEnumerable<object> collections, string family)
Outputs a `Summary` protocol buffer with images. The summary has up to `max_outputs` summary values containing images. The
images are built from `tensor` which must be 4-D with shape `[batch_size,
height, width, channels]` and where `channels` can be: * 1: `tensor` is interpreted as Grayscale.
* 3: `tensor` is interpreted as RGB.
* 4: `tensor` is interpreted as RGBA. The images have the same number of channels as the input tensor. For float
input, the values are normalized one image at a time to fit in the range
`[0, 255]`. `uint8` values are unchanged. The op uses two different
normalization algorithms: * If the input values are all positive, they are rescaled so the largest one
is 255. * If any input value is negative, the values are shifted so input value 0.0
is at 127. They are then rescaled so that either the smallest value is 0,
or the largest one is 255. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/image'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/image/0', '*name*/image/1', etc.
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IGraphNodeBase
tensor - A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, width, channels]` where `channels` is 1, 3, or 4.
-
int
max_outputs - Max number of batch elements to generate images for.
-
IEnumerable<object>
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
object image_dyn(object name, object tensor, ImplicitContainer<T> max_outputs, object collections, object family)
Outputs a `Summary` protocol buffer with images. The summary has up to `max_outputs` summary values containing images. The
images are built from `tensor` which must be 4-D with shape `[batch_size,
height, width, channels]` and where `channels` can be: * 1: `tensor` is interpreted as Grayscale.
* 3: `tensor` is interpreted as RGB.
* 4: `tensor` is interpreted as RGBA. The images have the same number of channels as the input tensor. For float
input, the values are normalized one image at a time to fit in the range
`[0, 255]`. `uint8` values are unchanged. The op uses two different
normalization algorithms: * If the input values are all positive, they are rescaled so the largest one
is 255. * If any input value is negative, the values are shifted so input value 0.0
is at 127. They are then rescaled so that either the smallest value is 0,
or the largest one is 255. The `tag` in the outputted Summary.Value protobufs is generated based on the
name, with a suffix depending on the max_outputs setting: * If `max_outputs` is 1, the summary value tag is '*name*/image'.
* If `max_outputs` is greater than 1, the summary value tags are
generated sequentially as '*name*/image/0', '*name*/image/1', etc.
Parameters
-
object
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
object
tensor - A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, width, channels]` where `channels` is 1, 3, or 4.
-
ImplicitContainer<T>
max_outputs - Max number of batch elements to generate images for.
-
object
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
-
object
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
object
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
void initialize(Graph graph, object session)
Initializes summary writing for graph execution mode. This operation is a no-op when executing eagerly. This helper method provides a higher-level alternative to using
tf.contrib.summary.summary_writer_initializer_op
and
tf.contrib.summary.graph
. Most users will also want to call `tf.compat.v1.train.create_global_step`
which can happen before or after this function is called.
Parameters
-
Graph
graph - A
tf.Graph
or `tf.compat.v1.GraphDef` to output to the writer. This function will not write the default graph by default. When writing to an event log file, the associated step will be zero. -
object
session - So this method can call
tf.Session.run
. This defaults to `tf.compat.v1.get_default_session`.
Tensor merge(IEnumerable<IGraphNodeBase> inputs, object collections, string name)
Merges summaries. This op creates a
[`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto)
protocol buffer that contains the union of all the values in the input
summaries. When the Op is run, it reports an `InvalidArgument` error if multiple values
in the summaries to merge use the same tag.
Parameters
-
IEnumerable<IGraphNodeBase>
inputs - A list of `string` `Tensor` objects containing serialized `Summary` protocol buffers.
-
object
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[]`.
-
string
name - A name for the operation (optional).
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer resulting from the merging.
Tensor merge_all(ImplicitContainer<T> key, string scope, string name)
Merges all summaries collected in the default graph.
Parameters
-
ImplicitContainer<T>
key - `GraphKey` used to collect the summaries. Defaults to `GraphKeys.SUMMARIES`.
-
string
scope - Optional scope used to filter the summary ops, using `re.match`
-
string
name
Returns
-
Tensor
- If no summaries were collected, returns None. Otherwise returns a scalar `Tensor` of type `string` containing the serialized `Summary` protocol buffer resulting from the merging.
object merge_all_dyn(ImplicitContainer<T> key, object scope, object name)
Merges all summaries collected in the default graph.
Parameters
-
ImplicitContainer<T>
key - `GraphKey` used to collect the summaries. Defaults to `GraphKeys.SUMMARIES`.
-
object
scope - Optional scope used to filter the summary ops, using `re.match`
-
object
name
Returns
-
object
- If no summaries were collected, returns None. Otherwise returns a scalar `Tensor` of type `string` containing the serialized `Summary` protocol buffer resulting from the merging.
object merge_dyn(object inputs, object collections, object name)
Merges summaries. This op creates a
[`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto)
protocol buffer that contains the union of all the values in the input
summaries. When the Op is run, it reports an `InvalidArgument` error if multiple values
in the summaries to merge use the same tag.
Parameters
-
object
inputs - A list of `string` `Tensor` objects containing serialized `Summary` protocol buffers.
-
object
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[]`.
-
object
name - A name for the operation (optional).
Returns
-
object
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer resulting from the merging.
IContextManager<T> record_if(bool condition)
IContextManager<T> record_if(IGraphNodeBase condition)
IContextManager<T> record_if(object condition)
object record_if_dyn(object condition)
Tensor scalar(string name, object tensor, IEnumerable<string> collections, string family)
Outputs a `Summary` protocol buffer containing a single scalar value. The generated Summary has a Tensor.proto containing the input Tensor.
Parameters
-
string
name - A name for the generated node. Will also serve as the series name in TensorBoard.
-
object
tensor - A real numeric Tensor containing a single value.
-
IEnumerable<string>
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. Which contains a `Summary` protobuf.
Tensor scalar(string name, PythonFunctionContainer tensor, IEnumerable<string> collections, string family)
Outputs a `Summary` protocol buffer containing a single scalar value. The generated Summary has a Tensor.proto containing the input Tensor.
Parameters
-
string
name - A name for the generated node. Will also serve as the series name in TensorBoard.
-
PythonFunctionContainer
tensor - A real numeric Tensor containing a single value.
-
IEnumerable<string>
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
-
string
family - Optional; if provided, used as the prefix of the summary tag name, which controls the tab name used for display on Tensorboard.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. Which contains a `Summary` protobuf.
Tensor tensor_summary(string name, IGraphNodeBase tensor, string summary_description, object collections, object summary_metadata, object family, string display_name)
Outputs a `Summary` protocol buffer with a serialized tensor.proto.
Parameters
-
string
name - A name for the generated node. If display_name is not set, it will also serve as the tag name in TensorBoard. (In that case, the tag name will inherit tf name scopes.)
-
IGraphNodeBase
tensor - A tensor of any type and shape to serialize.
-
string
summary_description - A long description of the summary sequence. Markdown is supported.
-
object
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
-
object
summary_metadata - Optional SummaryMetadata proto (which describes which plugins may use the summary value).
-
object
family - Optional; if provided, used as the prefix of the summary tag, which controls the name used for display on TensorBoard when display_name is not set.
-
string
display_name - A string used to name this data in TensorBoard. If this is not set, then the node name will be used instead.
Returns
-
Tensor
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
object tensor_summary_dyn(object name, object tensor, object summary_description, object collections, object summary_metadata, object family, object display_name)
Outputs a `Summary` protocol buffer with a serialized tensor.proto.
Parameters
-
object
name - A name for the generated node. If display_name is not set, it will also serve as the tag name in TensorBoard. (In that case, the tag name will inherit tf name scopes.)
-
object
tensor - A tensor of any type and shape to serialize.
-
object
summary_description - A long description of the summary sequence. Markdown is supported.
-
object
collections - Optional list of graph collections keys. The new summary op is added to these collections. Defaults to `[GraphKeys.SUMMARIES]`.
-
object
summary_metadata - Optional SummaryMetadata proto (which describes which plugins may use the summary value).
-
object
family - Optional; if provided, used as the prefix of the summary tag, which controls the name used for display on TensorBoard when display_name is not set.
-
object
display_name - A string used to name this data in TensorBoard. If this is not set, then the node name will be used instead.
Returns
-
object
- A scalar `Tensor` of type `string`. The serialized `Summary` protocol buffer.
Tensor text(string name, IGraphNodeBase tensor, object collections)
Summarizes textual data. Text data summarized via this plugin will be visible in the Text Dashboard
in TensorBoard. The standard TensorBoard Text Dashboard will render markdown
in the strings, and will automatically organize 1d and 2d tensors into tables.
If a tensor with more than 2 dimensions is provided, a 2d subarray will be
displayed along with a warning message. (Note that this behavior is not
intrinsic to the text summary api, but rather to the default TensorBoard text
plugin.)
Parameters
-
string
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
IGraphNodeBase
tensor - a string-type Tensor to summarize.
-
object
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
Returns
-
Tensor
- A TensorSummary op that is configured so that TensorBoard will recognize that it contains textual data. The TensorSummary is a scalar `Tensor` of type `string` which contains `Summary` protobufs.
object text_dyn(object name, object tensor, object collections)
Summarizes textual data. Text data summarized via this plugin will be visible in the Text Dashboard
in TensorBoard. The standard TensorBoard Text Dashboard will render markdown
in the strings, and will automatically organize 1d and 2d tensors into tables.
If a tensor with more than 2 dimensions is provided, a 2d subarray will be
displayed along with a warning message. (Note that this behavior is not
intrinsic to the text summary api, but rather to the default TensorBoard text
plugin.)
Parameters
-
object
name - A name for the generated node. Will also serve as a series name in TensorBoard.
-
object
tensor - a string-type Tensor to summarize.
-
object
collections - Optional list of ops.GraphKeys. The collections to add the summary to. Defaults to [_ops.GraphKeys.SUMMARIES]
Returns
-
object
- A TensorSummary op that is configured so that TensorBoard will recognize that it contains textual data. The TensorSummary is a scalar `Tensor` of type `string` which contains `Summary` protobufs.