public final class
TensorArray
An array of Tensors of given size.
Write data via Write and read via Read or Pack.
Nested Classes
class | TensorArray.Options | Optional attributes for TensorArray
|
Public Methods
static TensorArray.Options |
clearAfterRead(Boolean clearAfterRead)
|
static <T> TensorArray |
create(Scope scope, Operand<Integer> size, Class<T> dtype, Options... options)
Factory method to create a class wrapping a new TensorArray operation.
|
static TensorArray.Options |
dynamicSize(Boolean dynamicSize)
|
static TensorArray.Options |
elementShape(Shape elementShape)
|
Output<Float> |
flow()
A scalar used to control gradient flow.
|
Output<?> |
handle()
The handle to the TensorArray.
|
static TensorArray.Options |
identicalElementShapes(Boolean identicalElementShapes)
|
static TensorArray.Options |
tensorArrayName(String tensorArrayName)
|
Inherited Methods
Public Methods
public static TensorArray.Options clearAfterRead (Boolean clearAfterRead)
Parameters
clearAfterRead | If true (default), Tensors in the TensorArray are cleared after being read. This disables multiple read semantics but allows early release of memory. |
---|
public static TensorArray create (Scope scope, Operand<Integer> size, Class<T> dtype, Options... options)
Factory method to create a class wrapping a new TensorArray operation.
Parameters
scope | current scope |
---|---|
size | The size of the array. |
dtype | The type of the elements on the tensor_array. |
options | carries optional attributes values |
Returns
- a new instance of TensorArray
public static TensorArray.Options dynamicSize (Boolean dynamicSize)
Parameters
dynamicSize | A boolean that determines whether writes to the TensorArray are allowed to grow the size. By default, this is not allowed. |
---|
public static TensorArray.Options elementShape (Shape elementShape)
Parameters
elementShape | 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. |
---|
public static TensorArray.Options identicalElementShapes (Boolean identicalElementShapes)
Parameters
identicalElementShapes | 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. |
---|
public static TensorArray.Options tensorArrayName (String tensorArrayName)
Parameters
tensorArrayName | Overrides the name used for the temporary tensor_array resource. Default value is the name of the 'TensorArray' op (which is guaranteed unique). |
---|