tensorflow:: ops:: Stack

``` #include <array_ops.h> ```

Packs a list of ``` N ``` rank- ``` R ``` tensors into one rank- ``` (R+1) ``` tensor.

Summary

Packs the ``` N ``` tensors in ``` values ``` into a tensor with rank one higher than each tensor in ``` values ``` , by packing them along the ``` axis ``` dimension. Given a list of tensors of shape ``` (A, B, C) ``` ;

if ``` axis == 0 ``` then the ``` output ``` tensor will have the shape ``` (N, A, B, C) ``` . if ``` axis == 1 ``` then the ``` output ``` tensor will have the shape ``` (A, N, B, C) ``` . Etc.

For example:

```# 'x' is [1, 4]
# 'y' is [2, 5]
# 'z' is [3, 6]
pack([x, y, z]) => [[1, 4], [2, 5], [3, 6]]  # Pack along first dim.
pack([x, y, z], axis=1) => [[1, 2, 3], [4, 5, 6]]
```

This is the opposite of ``` unpack ``` .

Args:

• scope: A Scope object
• values: Must be of same shape and type.

Optional attributes (see ``` Attrs ``` ):

• axis: Dimension along which to pack. Negative values wrap around, so the valid range is ``` [-(R+1), R+1) ``` .

Returns:

• ``` Output ``` : The packed tensor.

Constructors and Destructors

``` Stack (const :: tensorflow::Scope & scope, :: tensorflow::InputList values) ```
``` Stack (const :: tensorflow::Scope & scope, :: tensorflow::InputList values, const Stack::Attrs & attrs) ```

Public attributes

``` operation ```
``` Operation ```
``` output ```
``` :: tensorflow::Output ```

Public functions

``` node () const ```
``` ::tensorflow::Node * ```
``` operator::tensorflow::Input () const ```
``` ```
``` operator::tensorflow::Output () const ```
``` ```

Public static functions

``` Axis (int64 x) ```
``` Attrs ```

Structs

tensorflow:: ops:: Stack:: Attrs

Optional attribute setters for Stack .

Public attributes

operation

`Operation operation`

output

`::tensorflow::Output output`

Public functions

Stack

``` Stack(
const ::tensorflow::Scope & scope,
::tensorflow::InputList values
)```

Stack

``` Stack(
const ::tensorflow::Scope & scope,
::tensorflow::InputList values,
const Stack::Attrs & attrs
)```

node

`::tensorflow::Node * node() const `

operator::tensorflow::Input

` operator::tensorflow::Input() const `

operator::tensorflow::Output

` operator::tensorflow::Output() const `

Public static functions

Axis

```Attrs Axis(
int64 x
)```
[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]