tensorflow:: ops:: 一時変数

#include <state_ops.h>

変更される可能性のあるテンソルを返しますが、その変更は単一のステップ内でのみ有効です。

まとめ

これは内部使用のみを目的とした実験的な操作であり、危険な方法で使用される可能性があります。リスクを十分に理解していない限り、使用しないでください。

呼び出し元は、他のすべての使用が完了した後、「ref」が最終的に対応する「 DestroyTemporaryVariable 」操作に渡されることを保証する責任があります。

テンソル状態への参照を出力するので、読み取りや変更が可能になります。

例 var = state_ops._temporary_variable([1, 2], types.float_) var_name = var.op.name var = state_ops.assign(var, [[4.0, 5.0]]) var = state_ops.assign_add(var, [[6.0, 7.0]]) Final = state_ops._destroy_temporary_variable(var, var_name=var_name)

議論:

  • スコープ:スコープオブジェクト
  • shape: 変数テンソルの形状。
  • dtype: 変数テンソル内の要素の型。

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

  • var_name: 一時変数リソースに使用される名前を上書きします。デフォルト値は「 TemporaryVariable 」操作の名前です(一意であることが保証されています)。

返品:

  • Output :変数テンソルへの参照。

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

TemporaryVariable (const :: tensorflow::Scope & scope, PartialTensorShape shape, DataType dtype)
TemporaryVariable (const :: tensorflow::Scope & scope, PartialTensorShape shape, DataType dtype, const TemporaryVariable::Attrs & attrs)

公開属性

operation
ref

公的機能

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

パブリック静的関数

VarName (StringPiece x)

構造

tensorflow:: ops:: TemporaryVariable:: Attrs

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

公開属性

手術

Operation operation

参照

::tensorflow::Output ref

公的機能

一時変数

 TemporaryVariable(
  const ::tensorflow::Scope & scope,
  PartialTensorShape shape,
  DataType dtype
)

一時変数

 TemporaryVariable(
  const ::tensorflow::Scope & scope,
  PartialTensorShape shape,
  DataType dtype,
  const TemporaryVariable::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

変数名

Attrs VarName(
  StringPiece x
)