เทนเซอร์โฟลว์:: ปฏิบัติการ:: ScatterDiv
#include <state_ops.h>แบ่งการอ้างอิงตัวแปรด้วยการอัพเดตแบบกระจัดกระจาย
สรุป
การดำเนินการนี้คำนวณ
# Scalar indices
ref[indices, ...] /= updates[...]# Vector indices (for each i) ref[indices[i], ...] /= updates[i, ...]
# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] /= updates[i, ..., j, ...] การดำเนินการนี้จะส่งออก ref หลังจากการอัพเดตเสร็จสิ้น ทำให้ง่ายต่อการเชื่อมโยงการดำเนินการที่ต้องใช้ค่ารีเซ็ต
รายการที่ซ้ำกันได้รับการจัดการอย่างถูกต้อง: หากมี indices หลายรายการอ้างอิงตำแหน่งเดียวกัน การมีส่วนร่วมจะแบ่งกัน
ต้องใช้ updates.shape = indices.shape + ref.shape[1:] หรือ updates.shape = []
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- อ้างอิง: ควรมาจากโหนด
Variable - ดัชนี: เทนเซอร์ของดัชนีในมิติแรกของ
ref - อัปเดต: เทนเซอร์ของค่าที่
refถูกหารด้วย
แอ็ตทริบิวต์ทางเลือก (ดู Attrs ):
- use_locking: หากเป็น True การดำเนินการจะได้รับการปกป้องด้วยการล็อค มิฉะนั้นพฤติกรรมจะไม่ได้กำหนดไว้ แต่อาจแสดงความขัดแย้งน้อยลง
ผลตอบแทน:
-
Output: = เหมือนกับrefกลับมาเพื่อความสะดวกสำหรับการดำเนินงานที่ต้องการใช้ค่าที่อัพเดตหลังจากการอัพเดตเสร็จสิ้น
ตัวสร้างและผู้ทำลาย | |
|---|---|
ScatterDiv (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates) | |
ScatterDiv (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterDiv::Attrs & attrs) |
คุณลักษณะสาธารณะ | |
|---|---|
operation | |
output_ref | |
งานสาธารณะ | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
ฟังก์ชันคงที่สาธารณะ | |
|---|---|
UseLocking (bool x) | |
โครงสร้าง | |
|---|---|
| เทนเซอร์โฟลว์ :: ops :: ScatterDiv :: Attrs | ตัวตั้งค่าแอ็ตทริบิวต์ทางเลือกสำหรับ ScatterDiv |
คุณลักษณะสาธารณะ
การดำเนินการ
Operation operation
เอาท์พุท_อ้างอิง
::tensorflow::Output output_ref
งานสาธารณะ
ScatterDiv
ScatterDiv( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates )
ScatterDiv
ScatterDiv( const ::tensorflow::Scope & scope, ::tensorflow::Input ref, ::tensorflow::Input indices, ::tensorflow::Input updates, const ScatterDiv::Attrs & attrs )
โหนด
::tensorflow::Node * node() const
ตัวดำเนินการ::tensorflow::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
ใช้ล็อค
Attrs UseLocking( bool x )