tensoreflusso:: ops:: Variabile temporanea

#include <state_ops.h>

Restituisce un tensore che può essere modificato, ma persiste solo all'interno di un singolo passaggio.

Riepilogo

Questa è un'operazione sperimentale solo per uso interno ed è possibile utilizzarla in modi non sicuri. NON UTILIZZARE a meno che non si comprendano appieno i rischi.

È responsabilità del chiamante assicurarsi che "ref" venga eventualmente passato a un'operazione " DestroyTemporaryVariable " corrispondente dopo che tutti gli altri utilizzi sono stati completati.

Emette un riferimento allo stato del tensore in modo che possa essere letto o modificato.

Ad esempio, 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)

Argomenti:

  • scope: un oggetto Scope
  • forma: la forma del tensore variabile.
  • dtype: il tipo di elementi nel tensore variabile.

Attributi facoltativi (vedi Attrs ):

  • var_name: sovrascrive il nome utilizzato per la risorsa variabile temporanea. Il valore predefinito è il nome dell'operazione ' TemporaryVariable ' (che è garantita univoca).

Ritorna:

  • Output : un riferimento alla variabile tensore.

Costruttori e distruttori

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

Attributi pubblici

operation
ref

Funzioni pubbliche

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

Funzioni pubbliche statiche

VarName (StringPiece x)

Strutture

tensorflow:: ops:: TemporaryVariable:: Attrs

Setter di attributi facoltativi per TemporaryVariable .

Attributi pubblici

operazione

Operation operation

rif

::tensorflow::Output ref

Funzioni pubbliche

Variabile temporanea

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

Variabile temporanea

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

nodo

::tensorflow::Node * node() const 

operatore::tensorflow::Input

 operator::tensorflow::Input() const 

operatore::tensorflow::Output

 operator::tensorflow::Output() const 

Funzioni pubbliche statiche

VarName

Attrs VarName(
  StringPiece x
)