tensorflow:: ops:: スタック

#include <array_ops.h>

N個のランクRテンソルのリストを、1つのランク(R+1)テンソルにパックします。

まとめ

valuesのN個のテンソルを、 axis次元に沿ってパックすることで、 valuesの各テンソルよりもランクが 1 つ高いテンソルにパックします。形状が(A, B, C)のテンソルのリストが与えられた場合。

axis == 0の場合、 outputテンソルの形状は(N, A, B, C)になります。 axis == 1の場合、 outputテンソルの形状は(A, N, B, C)になります。など。

例えば:

# '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]]

これはunpackの反対です。

議論:

  • スコープ:スコープオブジェクト
  • 値:形状と種類が同じである必要があります。

オプション属性( Attrs参照):

  • 軸: 詰め込む方向の寸法。負の値は折り返されるため、有効な範囲は[-(R+1), R+1)です。

返品:

  • Output :パックされたテンソル。

コンストラクターとデストラクタ

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

公開属性

operation
output

公的機能

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

パブリック静的関数

Axis (int64 x)

構造

tensorflow:: ops:: Stack:: Attrs

Stackのオプション属性セッター。

公開属性

手術

Operation operation

出力

::tensorflow::Output output

公的機能

スタック

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

スタック

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

ノード

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

軸

Attrs Axis(
  int64 x
)