Unstack

public final class Unstack

Unpacks a given dimension of a rank-`R` tensor into `num` rank-`(R-1)` tensors.

Unpacks `num` tensors from `value` by chipping it along the `axis` dimension. For example, given a tensor of shape `(A, B, C, D)`;

If `axis == 0` then the i'th tensor in `output` is the slice `value[i, :, :, :]` and each tensor in `output` will have shape `(B, C, D)`. (Note that the dimension unpacked along is gone, unlike `split`).

If `axis == 1` then the i'th tensor in `output` is the slice `value[:, i, :, :]` and each tensor in `output` will have shape `(A, C, D)`. Etc.

This is the opposite of `pack`.

Nested Classes

class Unstack.Options Optional attributes for Unstack  

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

static Unstack.Options
axis(Long axis)
static <T extends TType> Unstack<T>
create(Scope scope, Operand<T> value, Long num, Options... options)
Factory method to create a class wrapping a new Unstack operation.
Iterator<Operand<T>>
List<Output<T>>
output()
The list of tensors unpacked from `value`.

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "Unpack"

Public Methods

public static Unstack.Options axis (Long axis)

Parameters
axis Dimension along which to unpack. Negative values wrap around, so the valid range is `[-R, R)`.

public static Unstack<T> create (Scope scope, Operand<T> value, Long num, Options... options)

Factory method to create a class wrapping a new Unstack operation.

Parameters
scope current scope
value 1-D or higher, with `axis` dimension size equal to `num`.
options carries optional attributes values
Returns
  • a new instance of Unstack

public Iterator<Operand<T>> iterator ()

public List<Output<T>> output ()

The list of tensors unpacked from `value`.