เทนเซอร์โฟลว์:: ปฏิบัติการ:: กำหนด
#include <state_ops.h>อัปเดต 'ref' โดยกำหนด 'value' ให้กับมัน
สรุป
การดำเนินการนี้จะส่งออก "ref" หลังจากการกำหนดเสร็จสิ้น ทำให้ง่ายต่อการเชื่อมโยงการดำเนินการที่ต้องใช้ค่ารีเซ็ต
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
-  อ้างอิง: ควรมาจากโหนด Variableอาจไม่ได้กำหนดค่าเริ่มต้น
- ค่า: ค่าที่จะกำหนดให้กับตัวแปร
 แอ็ตทริบิวต์ทางเลือก (ดู Attrs ):
- validate_shape: หากเป็นจริง การดำเนินการจะตรวจสอบว่ารูปร่างของ 'ค่า' ตรงกับรูปร่างของ เทนเซอร์ ที่ได้รับมอบหมาย หากเป็นเท็จ '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) | |
| โครงสร้าง | |
|---|---|
| เทนเซอร์โฟลว์ :: ops :: กำหนด :: 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 )