tf.raw_ops.TensorArrayV3
Stay organized with collections
Save and categorize content based on your preferences.
An array of Tensors of given size.
tf.raw_ops.TensorArrayV3(
size,
dtype,
element_shape=None,
dynamic_size=False,
clear_after_read=True,
identical_element_shapes=False,
tensor_array_name='',
name=None
)
Write data via Write and read via Read or Pack.
Args |
size
|
A Tensor of type int32 . The size of the array.
|
dtype
|
A tf.DType . The type of the elements on the tensor_array.
|
element_shape
|
An optional tf.TensorShape or list of ints . Defaults to None .
The expected shape of an element, if known. Used to
validate the shapes of TensorArray elements. If this shape is not
fully specified, gathering zero-size TensorArrays is an error.
|
dynamic_size
|
An optional bool . Defaults to False .
A boolean that determines whether writes to the TensorArray
are allowed to grow the size. By default, this is not allowed.
|
clear_after_read
|
An optional bool . Defaults to True .
If true (default), Tensors in the TensorArray are cleared
after being read. This disables multiple read semantics but allows early
release of memory.
|
identical_element_shapes
|
An optional bool . Defaults to False .
If true (default is false), then all
elements in the TensorArray will be expected to have identical shapes.
This allows certain behaviors, like dynamically checking for
consistent shapes on write, and being able to fill in properly
shaped zero tensors on stack -- even if the element_shape attribute
is not fully defined.
|
tensor_array_name
|
An optional string . Defaults to "" .
Overrides the name used for the temporary tensor_array
resource. Default value is the name of the 'TensorArray' op (which
is guaranteed unique).
|
name
|
A name for the operation (optional).
|
Returns |
A tuple of Tensor objects (handle, flow).
|
handle
|
A Tensor of type resource .
|
flow
|
A Tensor of type float32 .
|
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. Some content is licensed under the numpy license.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tf.raw_ops.TensorArrayV3\n\n\u003cbr /\u003e\n\nAn array of Tensors of given size.\n\n#### View aliases\n\n\n**Compat aliases for migration**\n\nSee\n[Migration guide](https://www.tensorflow.org/guide/migrate) for\nmore details.\n\n[`tf.compat.v1.raw_ops.TensorArrayV3`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/TensorArrayV3)\n\n\u003cbr /\u003e\n\n tf.raw_ops.TensorArrayV3(\n size,\n dtype,\n element_shape=None,\n dynamic_size=False,\n clear_after_read=True,\n identical_element_shapes=False,\n tensor_array_name='',\n name=None\n )\n\nWrite data via Write and read via Read or Pack.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|----------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `size` | A `Tensor` of type `int32`. The size of the array. |\n| `dtype` | A [`tf.DType`](../../tf/dtypes/DType). The type of the elements on the tensor_array. |\n| `element_shape` | An optional [`tf.TensorShape`](../../tf/TensorShape) or list of `ints`. Defaults to `None`. The expected shape of an element, if known. Used to validate the shapes of TensorArray elements. If this shape is not fully specified, gathering zero-size TensorArrays is an error. |\n| `dynamic_size` | An optional `bool`. Defaults to `False`. A boolean that determines whether writes to the TensorArray are allowed to grow the size. By default, this is not allowed. |\n| `clear_after_read` | An optional `bool`. Defaults to `True`. If true (default), Tensors in the TensorArray are cleared after being read. This disables multiple read semantics but allows early release of memory. |\n| `identical_element_shapes` | An optional `bool`. Defaults to `False`. If true (default is false), then all elements in the TensorArray will be expected to have identical shapes. This allows certain behaviors, like dynamically checking for consistent shapes on write, and being able to fill in properly shaped zero tensors on stack -- even if the element_shape attribute is not fully defined. |\n| `tensor_array_name` | An optional `string`. Defaults to `\"\"`. Overrides the name used for the temporary tensor_array resource. Default value is the name of the 'TensorArray' op (which is guaranteed unique). |\n| `name` | A name for the operation (optional). |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|----------|--------------------------------|\n| A tuple of `Tensor` objects (handle, flow). ||\n| `handle` | A `Tensor` of type `resource`. |\n| `flow` | A `Tensor` of type `float32`. |\n\n\u003cbr /\u003e"]]