Class/Object

org.platanios.tensorflow.api.ops

TensorArray

Related Docs: object TensorArray | package ops

Permalink

case class TensorArray extends OutputConvertible with Product with Serializable

Class wrapping dynamic-sized, per-time-step, write-once tensor arrays.

This class is meant to be used with dynamic iteration primitives such as whileLoop and mapFunction. It supports gradient back-propagation via special "flow" control flow dependencies.

Note that the name of the TensorArray (even if passed in) is uniquified automatically. Each time a new TensorArray is created at runtime it is assigned its own name for the duration of the run. This avoids name collisions if a TensorArray is created within a whileLoop.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TensorArray
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. OutputConvertible
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def close(name: String = "TensorArrayClose"): Op

    Permalink

    Returns an op that deletes this tensor array from its resource container.

    Returns an op that deletes this tensor array from its resource container.

    This enables the user to close and release the resource in the middle of a step/run.

    name

    Name for the created op.

    returns

    Created op.

  7. val colocateWithFirstWrite: Boolean

    Permalink

    Boolean value indicating whether to place the tensor array on the same device as the tensor used on its first write call (write operations include write, unstack, and split).

    Boolean value indicating whether to place the tensor array on the same device as the tensor used on its first write call (write operations include write, unstack, and split). If false, the tensor array will be placed on the device determined by the op creation context available during its initialization.

  8. def concatenate(name: String = "TensorArrayConcatenate"): Output

    Permalink

    Creates an op that concatenates the elements of the tensor array.

    Creates an op that concatenates the elements of the tensor array.

    The op takes T elements with shapes [n0, d0, d1, ...], [n1, d0, d1, ...], ..., [n(T-1), d0, d1, ...] and concatenates them into a tensor with shape [n0 + n1 + ... + n(T-1), d0, d1, ...].

    All elements must have been written and must have the same shape, except for their first dimension.

    name

    Name for the created op.

    returns

    Tensor with all of the elements in the tensor array, concatenated along the first axis.

  9. val dataType: types.DataType

    Permalink

    Data type of the tensor array elements.

  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. val flow: Output

    Permalink

    Float scalar tensor for the tensor array, used to control gradient flow.

  13. def gather(indices: Output, name: String = "TensorArrayGather"): Output

    Permalink

    Creates an op that gathers specific elements from this tensor array.

    Creates an op that gathers specific elements from this tensor array.

    Note that all elements selected by indices must have been written and must have the same shape.

    indices

    One-dimensional tensor containing the positions in the tensor array from which to read tensor elements.

    name

    Name for the created op.

    returns

    Tensor containing the gathered elements, concatenated along a new axis (the new dimension 0).

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. val handle: Output

    Permalink

    Tensor handle to the tensor array.

  16. def identity: TensorArray

    Permalink

    Returns a tensor array with the same content and properties as this one.

    Returns a tensor array with the same content and properties as this one.

    returns

    New TensorArray object with a flow that ensures the control dependencies from the contexts will become control dependencies for writes, reads, etc. Use this object for all subsequent operations.

  17. val inferShape: Boolean

    Permalink

    Boolean value indicating whether shape inference is enabled.

    Boolean value indicating whether shape inference is enabled. If true, all elements must have the same shape.

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. def read(index: Output, name: String = "TensorArrayRead"): Output

    Permalink

    Creates an op that reads an element from this tensor array.

    Creates an op that reads an element from this tensor array.

    index

    Position to read from, inside the tensor array.

    name

    Name for the created op.

    returns

    Tensor in the specified position of the tensor array.

  23. def scatter(indices: Output, value: Output, name: String = "TensorArrayScatter"): TensorArray

    Permalink

    Creates an op that scatters the provided elements along indices of this tensor array.

    Creates an op that scatters the provided elements along indices of this tensor array.

    Note that indices must be a vector and its length must match the first dimension of value.

    indices

    One-dimensional tensor containing the positions in the tensor array at which to write the tensor elements.

    value

    Concatenated tensor to write to the tensor array.

    name

    Name for the created op.

    returns

    Output flow of the tensor array, used to enforce proper chaining of operations.

  24. def size(name: String = "TensorArraySize"): Output

    Permalink

    Returns an op that gets the current size of the tensor array.

    Returns an op that gets the current size of the tensor array.

    name

    Name for the created op.

    returns

    Created op output, containing the current size of the tensor array.

  25. def split(input: Output, lengths: Output, name: String = "TensorArraySplit"): TensorArray

    Permalink

    Splits the values of a tensor into a tensor array.

    Splits the values of a tensor into a tensor array.

    input

    (N+1)-dimensional tensor to split. Must have the same data type as this tensor array.

    lengths

    1-D integer tensor with the lengths to use when splitting input along its first dimension.

    name

    Name for the created op.

    returns

    Tensor array with flow that ensures the split occurs. Use this object for all subsequent operations.

  26. def stack(name: String = "TensorArrayStack"): Output

    Permalink

    Creates an op that returns the elements in this tensor array as a stacked tensor.

    Creates an op that returns the elements in this tensor array as a stacked tensor.

    Note that all elements of this tensor array must have been written and must have the same shape.

    If the elements have rank R, then the returned tensor shape will be equal to R + 1.

    name

    Name for the created op.

    returns

    Stacked tensor.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toOutput: Output

    Permalink

    Converts this tensor array to an output (i.e., dense symbolic tensor), by stacking it.

    Converts this tensor array to an output (i.e., dense symbolic tensor), by stacking it.

    Definition Classes
    TensorArrayOutputConvertible
  29. def unstack(value: Output, name: String = "TensorArrayUnstack"): TensorArray

    Permalink

    Creates an op that unstacks the values of a tensor in this tensor array.

    Creates an op that unstacks the values of a tensor in this tensor array.

    If the input value shapes have rank R, then the output tensor array will contain elements whose shapes have rank R - 1.

    value

    Tensor to unstack.

    name

    Name for the created op.

    returns

    New tensor array object with flow that ensures the unstack occurs. Use this object for all subsequent operations.

  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def write(index: Output, value: Output, name: String = "TensorArrayWrite"): TensorArray

    Permalink

    Creates an op that writes an element to this tensor array.

    Creates an op that writes an element to this tensor array.

    index

    Position to write to, inside the tensor array.

    value

    Tensor to write to the tensor array.

    name

    Name for the created op.

    returns

    Output flow of the tensor array, used to enforce proper chaining of operations.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from OutputConvertible

Inherited from AnyRef

Inherited from Any

Ungrouped