tensorflow:: ops:: Assign
#include <state_ops.h>อัปเดตค่า 'ref' โดยกำหนดค่า 'value' ให้กับมัน
สรุป
การดำเนินการนี้จะส่งออกค่า "ref" หลังจากทำการกำหนดค่าเสร็จแล้ว ซึ่งจะช่วยให้การเชื่อมโยงการดำเนินการที่ต้องใช้ค่าเริ่มต้นทำได้ง่ายขึ้น
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- อ้างอิง: ควรมาจากโหนด
Variableอาจยังไม่ได้กำหนดค่าเริ่มต้น - ค่า: ค่าที่จะกำหนดให้กับตัวแปร
คุณลักษณะเสริม (ดูที่ Attrs ):
- validate_shape: ถ้าเป็นจริง การดำเนินการจะตรวจสอบว่ารูปร่างของ 'value' ตรงกับรูปร่างของ Tensor ที่กำลังถูกกำหนดให้หรือไม่ ถ้าเป็นเท็จ '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) | |
โครงสร้าง | |
|---|---|
| tensorflow:: ops:: Assign:: 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
ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
ใช้การล็อก
Attrs UseLocking( bool x )
ตรวจสอบรูปร่าง
Attrs ValidateShape( bool x )