W3cubDocs

/TensorFlow C++

tensorflow::ops::TensorArray

#include <data_flow_ops.h>

An array of Tensors of given size, with data written via Write and read.

Summary

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.
  • 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
Public static functions
ClearAfterRead(bool x)
DynamicSize(bool x)
ElementShape(TensorShape x)
TensorArrayName(StringPiece x)
Structs
tensorflow::ops::TensorArray::Attrs

Optional attribute setters for TensorArray.

Public attributes

flow

::tensorflow::Output flow

handle

::tensorflow::Output handle

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(
  TensorShape x
)

TensorArrayName

Attrs TensorArrayName(
  StringPiece x
)

© 2017 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/api_docs/cc/class/tensorflow/ops/tensor-array.html