جریان تنسور:: عملیات:: متغیر

#include <state_ops.h>

حالت را به شکل یک تانسور نگه می دارد که در تمام مراحل باقی می ماند.

خلاصه

یک ref را به حالت تانسور خروجی می دهد تا بتوان آن را خواند یا اصلاح کرد. TODO(zhifengc/mrry): یک اشاره گر به یک سند با جزئیات بیشتر در مورد به اشتراک گذاری حالت ها در tensorflow اضافه می کند.

استدلال ها:

  • scope: یک شی Scope
  • shape: شکل تانسور متغیر.
  • dtype: نوع عناصر در تانسور متغیر.

ویژگی های اختیاری (به Attrs مراجعه کنید):

  • container: اگر خالی نباشد، این متغیر در ظرف داده شده قرار می گیرد. در غیر این صورت از یک کانتینر پیش فرض استفاده می شود.
  • shared_name: اگر خالی نباشد، این متغیر در سطل داده شده با این shared_name نامگذاری می شود. در غیر این صورت، به جای آن از نام گره استفاده می شود.

برمی گرداند:

  • Output : اشاره به تانسور متغیر.

سازندگان و تخریب کنندگان

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

صفات عمومی

operation
ref

توابع عمومی

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

توابع استاتیک عمومی

Container (StringPiece x)
SharedName (StringPiece x)

سازه ها

tensorflow:: ops:: متغیر:: Attrs

تنظیم کننده های ویژگی اختیاری برای متغیر .

صفات عمومی

عمل

Operation operation

مرجع

::tensorflow::Output ref

توابع عمومی

متغیر

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

متغیر

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

گره

::tensorflow::Node * node() const 

عملگر::tensorflow::ورودی

 operator::tensorflow::Input() const 

عملگر::tensorflow::خروجی

 operator::tensorflow::Output() const 

توابع استاتیک عمومی

ظرف

Attrs Container(
  StringPiece x
)

SharedName

Attrs SharedName(
  StringPiece x
)