tensorflow::ops::TensorArray

#include <data_flow_ops.h>

An array of Tensors of given size.

Summary

Write data via Write and read via Read or Pack.

Arguments:

  • scope: A Scope object
  • size: The size of the array.
  • dtype: The type of the elements on the tensor_array.

Optional attributes (see Attrs):

  • element_shape: 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: A boolean that determines whether writes to the TensorArray are allowed to grow the size. By default, this is not allowed.
  • clear_after_read: 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: If true (default is false), then all elements in the TensorArray will be expected to have 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: Overrides the name used for the temporary tensor_array resource. Default value is the name of the 'TensorArray' op (which is guaranteed unique).

Returns:

Constructors and Destructors
TensorArray(const ::tensorflow::Scope & scope, ::tensorflow::Input size, DataType dtype)
TensorArray(const ::tensorflow::Scope & scope, ::tensorflow::Input size, DataType dtype, const TensorArray::Attrs & attrs)
Public attributes
flow
handle
operation
Public static functions
ClearAfterRead(bool x)
DynamicSize(bool x)
ElementShape(PartialTensorShape x)
IdenticalElementShapes(bool x)
TensorArrayName(StringPiece x)
Structs
tensorflow::ops::TensorArray::Attrs

Optional attribute setters for TensorArray.

Public attributes

flow

::tensorflow::Output flow

handle

::tensorflow::Output handle

operation

Operation operation

Public functions

TensorArray

 TensorArray(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input size,
  DataType dtype
)

TensorArray

 TensorArray(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input size,
  DataType dtype,
  const TensorArray::Attrs & attrs
)

Public static functions

ClearAfterRead

Attrs ClearAfterRead(
  bool x
)

DynamicSize

Attrs DynamicSize(
  bool x
)

ElementShape

Attrs ElementShape(
  PartialTensorShape x
)

IdenticalElementShapes

Attrs IdenticalElementShapes(
  bool x
)

TensorArrayName

Attrs TensorArrayName(
  StringPiece x
)

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/tensor-array