tf.contrib.metrics.streaming_concat(values, axis=0, max_size=None, metrics_collections=None, updates_collections=None, name=None)
Concatenate values along an axis across batches.
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 value of the concatenated tensors.
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 ofvaluealong 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 thatvalueshould be added to. -
updates_collections: An optional list of collectionsupdate_opshould 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: ifvaluesdoes not have a statically known rank,axisis not in the valid range or the size ofvaluesis not statically known along any axis other thanaxis.
Please login to continue.