تدفق التوتر:: العمليات:: TemporaryVariable

#include <state_ops.h>

إرجاع موتر قد يكون متحورًا، ولكنه يستمر فقط خلال خطوة واحدة.

ملخص

هذه عملية تجريبية للاستخدام الداخلي فقط ومن الممكن استخدامها بطرق غير آمنة. لا تستخدمه إلا إذا كنت تفهم المخاطر تمامًا.

تقع على عاتق المتصل مسؤولية التأكد من تمرير "ref" في النهاية إلى عملية " DestroyTemporaryVariable " المطابقة بعد اكتمال جميع الاستخدامات الأخرى.

يُخرج مرجعًا إلى حالة الموتر بحيث يمكن قراءته أو تعديله.

على سبيل المثال، var =state_ops._temporary_variable([1, 2],types.float_) var_name = var.op.name var =state_ops.assi(var, [[4.0, 5.0]]) var =state_ops.sign_add(var, [[ 6.0, 7.0]]) نهائي =state_ops._destroy_temporary_variable(var, var_name=var_name)

الحجج:

  • النطاق: كائن النطاق
  • الشكل: شكل الموتر المتغير.
  • 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

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

TemporaryVariable

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

العقدة

::tensorflow::Node * node() const 

المشغل::tensorflow::الإدخال

 operator::tensorflow::Input() const 

المشغل::tensorflow::الإخراج

 operator::tensorflow::Output() const 

وظائف ثابتة العامة

فارنام

Attrs VarName(
  StringPiece x
)