テンソルフロー::作戦::割当

#include <state_ops.h>

「value」を代入して「ref」を更新します。

まとめ

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

引数:

  • スコープ:スコープオブジェクト
  • ref: Variableノードからのものである必要があります。初期化されていない可能性があります。
  • value: 変数に割り当てられる値。

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

  • validate_shape: true の場合、操作は「value」の形状が割り当てられているTensorの形状と一致することを検証します。 false の場合、「ref」は「value」の形になります。
  • use_locking: True の場合、割り当てはロックによって保護されます。それ以外の場合、動作は未定義ですが、競合が少なくなる可能性があります。

戻り値:

  • Output : = 「ref」と同じ。変数がリセットされた後に新しい値を使用する操作の便宜のために返されます。

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

Assign (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input value)
Assign (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input value, const Assign::Attrs & attrs)

パブリック属性

operation
output_ref

公共機能

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

パブリック静的関数

UseLocking (bool x)
ValidateShape (bool x)

構造体

tensorflow:: ops:: Assign:: Attrs

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

パブリック属性

手術

Operation operation

出力参照

::tensorflow::Output output_ref

公共機能

割当

 Assign(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input value
)

割当

 Assign(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input value,
  const Assign::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const 

パブリック静的関数

ロックを使用する

Attrs UseLocking(
  bool x
)

形状の検証

Attrs ValidateShape(
  bool x
)