#include <data_flow_ops.h>
Optional attribute setters for TensorArray.
Public attributes | |
---|---|
clear_after_read_ = true | bool |
dynamic_size_ = false | bool |
element_shape_ = ::tensorflow::PartialTensorShape() | PartialTensorShape |
identical_element_shapes_ = false | bool |
tensor_array_name_ = "" | StringPiece |
Public functions | |
---|---|
ClearAfterRead(bool x) | TF_MUST_USE_RESULT Attrs If true (default), Tensors in the TensorArray are cleared after being read. |
DynamicSize(bool x) | TF_MUST_USE_RESULT Attrs A boolean that determines whether writes to the TensorArray are allowed to grow the size. |
ElementShape(PartialTensorShape x) | TF_MUST_USE_RESULT Attrs The expected shape of an element, if known. |
IdenticalElementShapes(bool x) | TF_MUST_USE_RESULT Attrs If true (default is false), then all elements in the TensorArray will be expected to have have identical shapes. |
TensorArrayName(StringPiece x) | TF_MUST_USE_RESULT Attrs Overrides the name used for the temporary tensor_array resource. |
bool tensorflow::ops::TensorArray::Attrs::clear_after_read_ = true
bool tensorflow::ops::TensorArray::Attrs::dynamic_size_ = false
PartialTensorShape tensorflow::ops::TensorArray::Attrs::element_shape_ = ::tensorflow::PartialTensorShape()
bool tensorflow::ops::TensorArray::Attrs::identical_element_shapes_ = false
StringPiece tensorflow::ops::TensorArray::Attrs::tensor_array_name_ = ""
TF_MUST_USE_RESULT Attrs tensorflow::ops::TensorArray::Attrs::ClearAfterRead( bool x )
If true (default), Tensors in the TensorArray are cleared after being read.
This disables multiple read semantics but allows early release of memory.
Defaults to true
TF_MUST_USE_RESULT Attrs tensorflow::ops::TensorArray::Attrs::DynamicSize( bool x )
A boolean that determines whether writes to the TensorArray are allowed to grow the size.
By default, this is not allowed.
Defaults to false
TF_MUST_USE_RESULT Attrs tensorflow::ops::TensorArray::Attrs::ElementShape( PartialTensorShape x )
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.
Defaults to
TF_MUST_USE_RESULT Attrs tensorflow::ops::TensorArray::Attrs::IdenticalElementShapes( bool x )
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.
Defaults to false
TF_MUST_USE_RESULT Attrs tensorflow::ops::TensorArray::Attrs::TensorArrayName( StringPiece x )
Overrides the name used for the temporary tensor_array resource.
Default value is the name of the 'TensorArray' op (which is guaranteed unique).
Defaults to ""
© 2018 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/struct/tensorflow/ops/tensor-array/attrs.html