テンソルフロー::作戦::散布追加

#include <state_ops.h>

変数参照にスパース更新を追加します。

まとめ

この操作は

# Scalar indices
ref[indices, ...] += updates[...]

# Vector indices (for each i)
ref[indices[i], ...] += updates[i, ...]

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] += updates[i, ..., j, ...]
を計算します

この操作では、更新が完了した後にref出力します。これにより、リセット値を使用する必要がある操作をチェーンすることが容易になります。

重複エントリは正しく処理されます。複数のindices同じ場所を参照している場合、それらの寄与が加算されます。

updates.shape = indices.shape + ref.shape[1:]またはupdates.shape = []が必要です。

引数:

  • スコープ:スコープオブジェクト
  • ref: Variableノードからのものである必要があります。
  • indices: refの最初の次元へのインデックスのテンソル。
  • updated: refに追加する更新された値のテンソル。

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

  • use_locking: True の場合、追加はロックによって保護されます。それ以外の場合、動作は未定義ですが、競合が少なくなる可能性があります。

戻り値:

  • Output : = refと同じ。更新の完了後に更新された値を使用する必要がある操作の便宜として返されます。

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

ScatterAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates)
ScatterAdd (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterAdd::Attrs & attrs)

パブリック属性

operation
output_ref

公共機能

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

パブリック静的関数

UseLocking (bool x)

構造体

tensorflow:: ops:: ScatterAdd:: Attrs

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

パブリック属性

手術

Operation operation

出力参照

::tensorflow::Output output_ref

公共機能

散布追加

 ScatterAdd(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates
)

散布追加

 ScatterAdd(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates,
  const ScatterAdd::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const 

パブリック静的関数

ロックを使用する

Attrs UseLocking(
  bool x
)