T - data type for output() output@Operator public final class Unstack<T> extends PrimitiveOp implements Iterable<Operand<T>>
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`.
| Modifier and Type | Class and Description |
|---|---|
static class |
Unstack.Options
Optional attributes for
Unstack |
operation| Modifier and Type | Method and Description |
|---|---|
static Unstack.Options |
axis(Long axis) |
static <T> Unstack<T> |
create(Scope scope,
Operand<T> value,
Long num,
Unstack.Options... options)
Factory method to create a class to wrap a new Unstack operation to the graph.
|
Iterator<Operand<T>> |
iterator() |
List<Output<T>> |
output()
The list of tensors unpacked from `value`.
|
equals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static <T> Unstack<T> create(Scope scope, Operand<T> value, Long num, Unstack.Options... options)
scope - current graph scopevalue - 1-D or higher, with `axis` dimension size equal to `num`.num - options - carries optional attributes valuespublic static Unstack.Options axis(Long axis)
axis - Dimension along which to unpack. Negative values wrap around, so the
valid range is `[-R, R)`.Copyright © 2015–2019. All rights reserved.