tf.contrib.metrics.streaming_concat
Stay organized with collections
Save and categorize content based on your preferences.
Concatenate values along an axis across batches.
tf.contrib.metrics.streaming_concat(
values, axis=0, max_size=None, metrics_collections=None,
updates_collections=None, name=None
)
The function streaming_concat
creates two local variables, array
and
size
, that are used to store concatenated values. Internally, array
is
used as storage for a dynamic array (if maxsize
is None
), which ensures
that updates can be run in amortized constant time.
For estimation of the metric over a stream of data, the function creates an
update_op
operation that appends the values of a tensor and returns the
length of the concatenated axis.
This op allows for evaluating metrics that cannot be updated incrementally
using the same framework as other streaming metrics.
Args |
values
|
Tensor to concatenate. Rank and the shape along all axes other
than the axis to concatenate along must be statically known.
|
axis
|
optional integer axis to concatenate along.
|
max_size
|
optional integer maximum size of value along the given axis.
Once the maximum size is reached, further updates are no-ops. By default,
there is no maximum size: the array is resized as necessary.
|
metrics_collections
|
An optional list of collections that value should be
added to.
|
updates_collections
|
An optional list of collections update_op should be
added to.
|
name
|
An optional variable_scope name.
|
Returns |
value
|
A Tensor representing the concatenated values.
|
update_op
|
An operation that concatenates the next values.
|
Raises |
ValueError
|
if values does not have a statically known rank, axis is
not in the valid range or the size of values is not statically known
along any axis other than axis .
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.metrics.streaming_concat\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/metrics/python/ops/metric_ops.py#L3558-L3668) |\n\nConcatenate values along an axis across batches. \n\n tf.contrib.metrics.streaming_concat(\n values, axis=0, max_size=None, metrics_collections=None,\n updates_collections=None, name=None\n )\n\nThe function `streaming_concat` creates two local variables, `array` and\n`size`, that are used to store concatenated values. Internally, `array` is\nused as storage for a dynamic array (if `maxsize` is `None`), which ensures\nthat updates can be run in amortized constant time.\n\nFor estimation of the metric over a stream of data, the function creates an\n`update_op` operation that appends the values of a tensor and returns the\nlength of the concatenated axis.\n\nThis op allows for evaluating metrics that cannot be updated incrementally\nusing the same framework as other streaming metrics.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `values` | `Tensor` to concatenate. Rank and the shape along all axes other than the axis to concatenate along must be statically known. |\n| `axis` | optional integer axis to concatenate along. |\n| `max_size` | optional integer maximum size of `value` along the given axis. Once the maximum size is reached, further updates are no-ops. By default, there is no maximum size: the array is resized as necessary. |\n| `metrics_collections` | An optional list of collections that `value` should be added to. |\n| `updates_collections` | An optional list of collections `update_op` should be added to. |\n| `name` | An optional variable_scope name. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|-------------|--------------------------------------------------|\n| `value` | A `Tensor` representing the concatenated values. |\n| `update_op` | An operation that concatenates the next values. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `ValueError` | if `values` does not have a statically known rank, `axis` is not in the valid range or the size of `values` is not statically known along any axis other than `axis`. |\n\n\u003cbr /\u003e"]]