tensorflow:: ops:: Gather

#include <array_ops.h>

paramsからindicesに従ってスライスを収集します。

まとめ

indices任意の次元 (通常は 0 次元または 1 次元) の整数テンソルである必要があります。出力テンソルの形状はindices.shape + params.shape[1:]となります。

    # Scalar indices
    output[:, ..., :] = params[indices, :, ... :]

    # Vector indices
    output[i, :, ..., :] = params[indices[i], :, ... :]

    # Higher rank indices
    output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]

indicesが順列であり、 len(indices) == params.shape[0]の場合、この操作はparamsそれに応じて順列します。

validate_indices : 非推奨。この操作が CPU に割り当てられている場合、 indicesの値は常に範囲内にあることが検証されます。GPU に割り当てられている場合、範囲外のインデックスは安全ですが、動作は未規定であり、エラーが発生する場合があります。

議論:

返品:

  • Output :出力テンソル。

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

Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices)
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, const Gather::Attrs & attrs)

公開属性

operation
output

公的機能

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

パブリック静的関数

ValidateIndices (bool x)

構造

tensorflow:: ops:: Gather:: Attrs

Gatherのオプションの属性設定子。

公開属性

手術

Operation operation

出力

::tensorflow::Output output

公的機能

集める

 Gather(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices
)

集める

 Gather(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  const Gather::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

ValidateIndices

Attrs ValidateIndices(
  bool x
)