diff options
Diffstat (limited to 'tensorflow/g3doc')
13 files changed, 59 insertions, 417 deletions
diff --git a/tensorflow/g3doc/api_docs/python/contrib.framework.md b/tensorflow/g3doc/api_docs/python/contrib.framework.md index 49892fdcaf..a10cd9d097 100644 --- a/tensorflow/g3doc/api_docs/python/contrib.framework.md +++ b/tensorflow/g3doc/api_docs/python/contrib.framework.md @@ -59,7 +59,7 @@ Assert `tensor` is 0-D, of type `tf.int32` or `tf.int64`. - - - -### `tf.contrib.framework.convert_to_tensor_or_sparse_tensor(value, dtype=None, name=None)` {#convert_to_tensor_or_sparse_tensor} +### `tf.convert_to_tensor_or_sparse_tensor(value, dtype=None, name=None)` {#convert_to_tensor_or_sparse_tensor} Converts value to a `SparseTensor` or `Tensor`. diff --git a/tensorflow/g3doc/api_docs/python/framework.md b/tensorflow/g3doc/api_docs/python/framework.md index c064ea3141..7aae9ea276 100644 --- a/tensorflow/g3doc/api_docs/python/framework.md +++ b/tensorflow/g3doc/api_docs/python/framework.md @@ -2551,6 +2551,31 @@ unmodified. Otherwise, it is converted to a `Tensor` using - - - +### `tf.convert_to_tensor_or_sparse_tensor(value, dtype=None, name=None)` {#convert_to_tensor_or_sparse_tensor} + +Converts value to a `SparseTensor` or `Tensor`. + +##### Args: + + +* <b>`value`</b>: A `SparseTensor`, `SparseTensorValue`, or an object whose type has a + registered `Tensor` conversion function. +* <b>`dtype`</b>: Optional element type for the returned tensor. If missing, the + type is inferred from the type of `value`. +* <b>`name`</b>: Optional name to use if a new `Tensor` is created. + +##### Returns: + + A `SparseTensor` or `Tensor` based on `value`. + +##### Raises: + + +* <b>`RuntimeError`</b>: If result type is incompatible with `dtype`. + + +- - - + ### `tf.get_default_graph()` {#get_default_graph} Returns the default graph for the current thread. @@ -2795,7 +2820,7 @@ The following standard keys are defined: for more details. * `SUMMARIES`: the summary `Tensor` objects that have been created in the graph. See - [`tf.contrib.deprecated.merge_all_summaries()`](../../api_docs/python/train.md#merge_all_summaries) + [`tf.summary.merge_all()`](../../api_docs/python/summary.md#merge_all) for more details. * `QUEUE_RUNNERS`: the `QueueRunner` objects that are used to produce input for a computation. See diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.contrib.framework.convert_to_tensor_or_sparse_tensor.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.convert_to_tensor_or_sparse_tensor.md index 089f02a9b4..1999e71180 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.contrib.framework.convert_to_tensor_or_sparse_tensor.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard0/tf.convert_to_tensor_or_sparse_tensor.md @@ -1,4 +1,4 @@ -### `tf.contrib.framework.convert_to_tensor_or_sparse_tensor(value, dtype=None, name=None)` {#convert_to_tensor_or_sparse_tensor} +### `tf.convert_to_tensor_or_sparse_tensor(value, dtype=None, name=None)` {#convert_to_tensor_or_sparse_tensor} Converts value to a `SparseTensor` or `Tensor`. diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.merge_all_summaries.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.merge_all_summaries.md deleted file mode 100644 index 40143de15d..0000000000 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard1/tf.merge_all_summaries.md +++ /dev/null @@ -1,16 +0,0 @@ -### `tf.merge_all_summaries(key='summaries')` {#merge_all_summaries} - -Merges all summaries collected in the default graph. - -##### Args: - - -* <b>`key`</b>: `GraphKey` used to collect the summaries. Defaults to - `GraphKeys.SUMMARIES`. - -##### Returns: - - 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. - diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.image_summary.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.image_summary.md deleted file mode 100644 index 5df729544b..0000000000 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard2/tf.image_summary.md +++ /dev/null @@ -1,48 +0,0 @@ -### `tf.image_summary(tag, tensor, max_images=3, collections=None, name=None)` {#image_summary} - -Outputs a `Summary` protocol buffer with images. - -The summary has up to `max_images` 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` argument is a scalar `Tensor` of type `string`. It is used to -build the `tag` of the summary values: - -* If `max_images` is 1, the summary value tag is '*tag*/image'. -* If `max_images` is greater than 1, the summary value tags are - generated sequentially as '*tag*/image/0', '*tag*/image/1', etc. - -##### Args: - - -* <b>`tag`</b>: A scalar `Tensor` of type `string`. Used to build the `tag` - of the summary values. -* <b>`tensor`</b>: A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, - width, channels]` where `channels` is 1, 3, or 4. -* <b>`max_images`</b>: Max number of batch elements to generate images for. -* <b>`collections`</b>: Optional list of ops.GraphKeys. The collections to add the - summary to. Defaults to [ops.GraphKeys.SUMMARIES] -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.scalar_summary.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.scalar_summary.md deleted file mode 100644 index 1e8c3479e4..0000000000 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard3/tf.scalar_summary.md +++ /dev/null @@ -1,21 +0,0 @@ -### `tf.scalar_summary(tags, values, collections=None, name=None)` {#scalar_summary} - -Outputs a `Summary` protocol buffer with scalar values. - -The input `tags` and `values` must have the same shape. The generated -summary has a summary value for each tag-value pair in `tags` and `values`. - -##### Args: - - -* <b>`tags`</b>: A `string` `Tensor`. Tags for the summaries. -* <b>`values`</b>: A real numeric Tensor. Values for the summaries. -* <b>`collections`</b>: Optional list of graph collections keys. The new summary op is - added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.histogram_summary.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.histogram_summary.md deleted file mode 100644 index 1ede11e820..0000000000 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.histogram_summary.md +++ /dev/null @@ -1,25 +0,0 @@ -### `tf.histogram_summary(tag, values, collections=None, name=None)` {#histogram_summary} - -Outputs a `Summary` protocol buffer with a histogram. - -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. - -##### Args: - - -* <b>`tag`</b>: A `string` `Tensor`. 0-D. Tag to use for the summary value. -* <b>`values`</b>: A real numeric `Tensor`. Any shape. Values to use to - build the histogram. -* <b>`collections`</b>: Optional list of graph collections keys. The new summary op is - added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.merge_summary.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.merge_summary.md deleted file mode 100644 index b61a501c2d..0000000000 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard5/tf.merge_summary.md +++ /dev/null @@ -1,26 +0,0 @@ -### `tf.merge_summary(inputs, collections=None, name=None)` {#merge_summary} - -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. - -##### Args: - - -* <b>`inputs`</b>: A list of `string` `Tensor` objects containing serialized `Summary` - protocol buffers. -* <b>`collections`</b>: Optional list of graph collections keys. The new summary op is - added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer resulting from the merging. - diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.GraphKeys.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.GraphKeys.md index ff09e97780..74b46140d2 100644 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.GraphKeys.md +++ b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard8/tf.GraphKeys.md @@ -27,7 +27,7 @@ The following standard keys are defined: for more details. * `SUMMARIES`: the summary `Tensor` objects that have been created in the graph. See - [`tf.contrib.deprecated.merge_all_summaries()`](../../api_docs/python/train.md#merge_all_summaries) + [`tf.summary.merge_all()`](../../api_docs/python/summary.md#merge_all) for more details. * `QUEUE_RUNNERS`: the `QueueRunner` objects that are used to produce input for a computation. See diff --git a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.audio_summary.md b/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.audio_summary.md deleted file mode 100644 index c0aff77770..0000000000 --- a/tensorflow/g3doc/api_docs/python/functions_and_classes/shard9/tf.audio_summary.md +++ /dev/null @@ -1,36 +0,0 @@ -### `tf.audio_summary(tag, tensor, sample_rate, max_outputs=3, collections=None, name=None)` {#audio_summary} - -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` argument is a scalar `Tensor` of type `string`. It is used to -build the `tag` of the summary values: - -* If `max_outputs` is 1, the summary value tag is '*tag*/audio'. -* If `max_outputs` is greater than 1, the summary value tags are - generated sequentially as '*tag*/audio/0', '*tag*/audio/1', etc. - -##### Args: - - -* <b>`tag`</b>: A scalar `Tensor` of type `string`. Used to build the `tag` - of the summary values. -* <b>`tensor`</b>: A 3-D `float32` `Tensor` of shape `[batch_size, frames, channels]` - or a 2-D `float32` `Tensor` of shape `[batch_size, frames]`. -* <b>`sample_rate`</b>: A Scalar `float32` `Tensor` indicating the sample rate of the - signal in hertz. -* <b>`max_outputs`</b>: Max number of batch elements to generate audio for. -* <b>`collections`</b>: Optional list of ops.GraphKeys. The collections to add the - summary to. Defaults to [ops.GraphKeys.SUMMARIES] -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - diff --git a/tensorflow/g3doc/api_docs/python/index.md b/tensorflow/g3doc/api_docs/python/index.md index 5c04276e93..eafb30c332 100644 --- a/tensorflow/g3doc/api_docs/python/index.md +++ b/tensorflow/g3doc/api_docs/python/index.md @@ -9,6 +9,7 @@ * [`control_dependencies`](../../api_docs/python/framework.md#control_dependencies) * [`convert_to_tensor`](../../api_docs/python/framework.md#convert_to_tensor) * [`convert_to_tensor_or_indexed_slices`](../../api_docs/python/framework.md#convert_to_tensor_or_indexed_slices) + * [`convert_to_tensor_or_sparse_tensor`](../../api_docs/python/framework.md#convert_to_tensor_or_sparse_tensor) * [`device`](../../api_docs/python/framework.md#device) * [`DeviceSpec`](../../api_docs/python/framework.md#DeviceSpec) * [`Dimension`](../../api_docs/python/framework.md#Dimension) @@ -569,6 +570,7 @@ * [`weighted_cross_entropy_with_logits`](../../api_docs/python/nn.md#weighted_cross_entropy_with_logits) * [`weighted_moments`](../../api_docs/python/nn.md#weighted_moments) * [`with_space_to_batch`](../../api_docs/python/nn.md#with_space_to_batch) + * [`zero_fraction`](../../api_docs/python/nn.md#zero_fraction) * **[Neural Network RNN Cells](../../api_docs/python/rnn_cell.md)**: * [`BasicLSTMCell`](../../api_docs/python/rnn_cell.md#BasicLSTMCell) @@ -616,7 +618,6 @@ * [`add_queue_runner`](../../api_docs/python/train.md#add_queue_runner) * [`AggregationMethod`](../../api_docs/python/train.md#AggregationMethod) * [`assert_global_step`](../../api_docs/python/train.md#assert_global_step) - * [`audio_summary`](../../api_docs/python/train.md#audio_summary) * [`basic_train_loop`](../../api_docs/python/train.md#basic_train_loop) * [`checkpoint_exists`](../../api_docs/python/train.md#checkpoint_exists) * [`CheckpointSaverHook`](../../api_docs/python/train.md#CheckpointSaverHook) @@ -640,13 +641,9 @@ * [`GradientDescentOptimizer`](../../api_docs/python/train.md#GradientDescentOptimizer) * [`gradients`](../../api_docs/python/train.md#gradients) * [`hessians`](../../api_docs/python/train.md#hessians) - * [`histogram_summary`](../../api_docs/python/train.md#histogram_summary) - * [`image_summary`](../../api_docs/python/train.md#image_summary) * [`inverse_time_decay`](../../api_docs/python/train.md#inverse_time_decay) * [`LoggingTensorHook`](../../api_docs/python/train.md#LoggingTensorHook) * [`LooperThread`](../../api_docs/python/train.md#LooperThread) - * [`merge_all_summaries`](../../api_docs/python/train.md#merge_all_summaries) - * [`merge_summary`](../../api_docs/python/train.md#merge_summary) * [`MomentumOptimizer`](../../api_docs/python/train.md#MomentumOptimizer) * [`MonitoredSession`](../../api_docs/python/train.md#MonitoredSession) * [`MonitoredTrainingSession`](../../api_docs/python/train.md#MonitoredTrainingSession) @@ -663,7 +660,6 @@ * [`replica_device_setter`](../../api_docs/python/train.md#replica_device_setter) * [`RMSPropOptimizer`](../../api_docs/python/train.md#RMSPropOptimizer) * [`Scaffold`](../../api_docs/python/train.md#Scaffold) - * [`scalar_summary`](../../api_docs/python/train.md#scalar_summary) * [`Server`](../../api_docs/python/train.md#Server) * [`SessionCreator`](../../api_docs/python/train.md#SessionCreator) * [`SessionManager`](../../api_docs/python/train.md#SessionManager) @@ -682,7 +678,6 @@ * [`SyncReplicasOptimizerV2`](../../api_docs/python/train.md#SyncReplicasOptimizerV2) * [`WorkerSessionCreator`](../../api_docs/python/train.md#WorkerSessionCreator) * [`write_graph`](../../api_docs/python/train.md#write_graph) - * [`zero_fraction`](../../api_docs/python/train.md#zero_fraction) * **[Wraps python functions](../../api_docs/python/script_ops.md)**: * [`py_func`](../../api_docs/python/script_ops.md#py_func) diff --git a/tensorflow/g3doc/api_docs/python/nn.md b/tensorflow/g3doc/api_docs/python/nn.md index 948b63a3d0..1285cffe7c 100644 --- a/tensorflow/g3doc/api_docs/python/nn.md +++ b/tensorflow/g3doc/api_docs/python/nn.md @@ -3930,3 +3930,31 @@ Produces the average pool of the input tensor for quantized types. * <b>`max_output`</b>: A `Tensor` of type `float32`. The float value that the highest quantized output value represents. + +## Other Functions and Classes +- - - + +### `tf.nn.zero_fraction(value, name=None)` {#zero_fraction} + +Returns the fraction of zeros in `value`. + +If `value` is empty, the result is `nan`. + +This is useful in summaries to measure and report sparsity. For example, + +```python + z = tf.Relu(...) + summ = tf.contrib.deprecated.scalar_summary('sparsity', tf.nn.zero_fraction(z)) +``` + +##### Args: + + +* <b>`value`</b>: A tensor of numeric type. +* <b>`name`</b>: A name for the operation (optional). + +##### Returns: + + The fraction of zeros in `value`, with type `float32`. + + diff --git a/tensorflow/g3doc/api_docs/python/train.md b/tensorflow/g3doc/api_docs/python/train.md index d215b6febc..cf49c55d3d 100644 --- a/tensorflow/g3doc/api_docs/python/train.md +++ b/tensorflow/g3doc/api_docs/python/train.md @@ -3880,240 +3880,6 @@ This method is completely compatible with the `tf.Session.run()` method. -## Summary Operations - -The following ops output -[`Summary`](https://www.tensorflow.org/code/tensorflow/core/framework/summary.proto) -protocol buffers as serialized string tensors. - -You can fetch the output of a summary op in a session, and pass it to -a [SummaryWriter](../../api_docs/python/train.md#SummaryWriter) to append it -to an event file. Event files contain -[`Event`](https://www.tensorflow.org/code/tensorflow/core/util/event.proto) -protos that can contain `Summary` protos along with the timestamp and -step. You can then use TensorBoard to visualize the contents of the -event files. See [TensorBoard and -Summaries](../../how_tos/summaries_and_tensorboard/index.md) for more -details. - -- - - - -### `tf.scalar_summary(tags, values, collections=None, name=None)` {#scalar_summary} - -Outputs a `Summary` protocol buffer with scalar values. - -The input `tags` and `values` must have the same shape. The generated -summary has a summary value for each tag-value pair in `tags` and `values`. - -##### Args: - - -* <b>`tags`</b>: A `string` `Tensor`. Tags for the summaries. -* <b>`values`</b>: A real numeric Tensor. Values for the summaries. -* <b>`collections`</b>: Optional list of graph collections keys. The new summary op is - added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - - -- - - - -### `tf.image_summary(tag, tensor, max_images=3, collections=None, name=None)` {#image_summary} - -Outputs a `Summary` protocol buffer with images. - -The summary has up to `max_images` 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` argument is a scalar `Tensor` of type `string`. It is used to -build the `tag` of the summary values: - -* If `max_images` is 1, the summary value tag is '*tag*/image'. -* If `max_images` is greater than 1, the summary value tags are - generated sequentially as '*tag*/image/0', '*tag*/image/1', etc. - -##### Args: - - -* <b>`tag`</b>: A scalar `Tensor` of type `string`. Used to build the `tag` - of the summary values. -* <b>`tensor`</b>: A 4-D `uint8` or `float32` `Tensor` of shape `[batch_size, height, - width, channels]` where `channels` is 1, 3, or 4. -* <b>`max_images`</b>: Max number of batch elements to generate images for. -* <b>`collections`</b>: Optional list of ops.GraphKeys. The collections to add the - summary to. Defaults to [ops.GraphKeys.SUMMARIES] -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - - -- - - - -### `tf.audio_summary(tag, tensor, sample_rate, max_outputs=3, collections=None, name=None)` {#audio_summary} - -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` argument is a scalar `Tensor` of type `string`. It is used to -build the `tag` of the summary values: - -* If `max_outputs` is 1, the summary value tag is '*tag*/audio'. -* If `max_outputs` is greater than 1, the summary value tags are - generated sequentially as '*tag*/audio/0', '*tag*/audio/1', etc. - -##### Args: - - -* <b>`tag`</b>: A scalar `Tensor` of type `string`. Used to build the `tag` - of the summary values. -* <b>`tensor`</b>: A 3-D `float32` `Tensor` of shape `[batch_size, frames, channels]` - or a 2-D `float32` `Tensor` of shape `[batch_size, frames]`. -* <b>`sample_rate`</b>: A Scalar `float32` `Tensor` indicating the sample rate of the - signal in hertz. -* <b>`max_outputs`</b>: Max number of batch elements to generate audio for. -* <b>`collections`</b>: Optional list of ops.GraphKeys. The collections to add the - summary to. Defaults to [ops.GraphKeys.SUMMARIES] -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - - -- - - - -### `tf.histogram_summary(tag, values, collections=None, name=None)` {#histogram_summary} - -Outputs a `Summary` protocol buffer with a histogram. - -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. - -##### Args: - - -* <b>`tag`</b>: A `string` `Tensor`. 0-D. Tag to use for the summary value. -* <b>`values`</b>: A real numeric `Tensor`. Any shape. Values to use to - build the histogram. -* <b>`collections`</b>: Optional list of graph collections keys. The new summary op is - added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer. - - -- - - - -### `tf.nn.zero_fraction(value, name=None)` {#zero_fraction} - -Returns the fraction of zeros in `value`. - -If `value` is empty, the result is `nan`. - -This is useful in summaries to measure and report sparsity. For example, - -```python - z = tf.Relu(...) - summ = tf.contrib.deprecated.scalar_summary('sparsity', tf.nn.zero_fraction(z)) -``` - -##### Args: - - -* <b>`value`</b>: A tensor of numeric type. -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - The fraction of zeros in `value`, with type `float32`. - - - -- - - - -### `tf.merge_summary(inputs, collections=None, name=None)` {#merge_summary} - -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. - -##### Args: - - -* <b>`inputs`</b>: A list of `string` `Tensor` objects containing serialized `Summary` - protocol buffers. -* <b>`collections`</b>: Optional list of graph collections keys. The new summary op is - added to these collections. Defaults to `[GraphKeys.SUMMARIES]`. -* <b>`name`</b>: A name for the operation (optional). - -##### Returns: - - A scalar `Tensor` of type `string`. The serialized `Summary` protocol - buffer resulting from the merging. - - -- - - - -### `tf.merge_all_summaries(key='summaries')` {#merge_all_summaries} - -Merges all summaries collected in the default graph. - -##### Args: - - -* <b>`key`</b>: `GraphKey` used to collect the summaries. Defaults to - `GraphKeys.SUMMARIES`. - -##### Returns: - - 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. - - - ## Reading Summaries from Event Files See [Summaries and |