W3cubDocs

/TensorFlow C++

tensorflow::ops::Unstack

#include <array_ops.h>

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

Summary

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.

Arguments:

  • scope: A Scope object
  • value: 1-D or higher, with axis dimension size equal to num.

Optional attributes (see Attrs):

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

Returns:

  • OutputList: The list of tensors unpacked from value.
Constructors and Destructors
Unstack(const ::tensorflow::Scope & scope, ::tensorflow::Input value, int64 num)
Unstack(const ::tensorflow::Scope & scope, ::tensorflow::Input value, int64 num, const Unstack::Attrs & attrs)
Public attributes
output
Public functions
operator[](size_t index) const
Public static functions
Axis(int64 x)
Structs
tensorflow::ops::Unstack::Attrs

Optional attribute setters for Unstack.

Public attributes

output

::tensorflow::OutputList output

Public functions

Unstack

 Unstack(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input value,
  int64 num
)

Unstack

 Unstack(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input value,
  int64 num,
  const Unstack::Attrs & attrs
)

operator[]

::tensorflow::Output operator[](
  size_t index
) const 

Public static functions

Axis

Attrs Axis(
  int64 x
)

© 2017 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/class/tensorflow/ops/unstack.html