เทนเซอร์โฟลว์:: ปฏิบัติการ:: กระจายมิน

#include <state_ops.h>

ลดการอัปเดตแบบกระจัดกระจายลงในการอ้างอิงตัวแปรโดยใช้การดำเนินการ min

สรุป

การดำเนินการนี้คำนวณ

# Scalar indices
ref[indices, ...] = min(ref[indices, ...], updates[...])

# Vector indices (for each i)
ref[indices[i], ...] = min(ref[indices[i], ...], updates[i, ...])

# High rank indices (for each i, ..., j)
ref[indices[i, ..., j], ...] = min(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 กลับมาเพื่อความสะดวกสำหรับการดำเนินงานที่ต้องการใช้ค่าที่อัพเดตหลังจากการอัพเดตเสร็จสิ้น

ตัวสร้างและผู้ทำลาย

ScatterMin (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates)
ScatterMin (const :: tensorflow::Scope & scope, :: tensorflow::Input ref, :: tensorflow::Input indices, :: tensorflow::Input updates, const ScatterMin::Attrs & attrs)

คุณลักษณะสาธารณะ

operation
output_ref

งานสาธารณะ

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

ฟังก์ชันคงที่สาธารณะ

UseLocking (bool x)

โครงสร้าง

เทนเซอร์โฟลว์ :: ops :: ScatterMin :: Attrs

ตัวตั้งค่าแอ็ตทริบิวต์ทางเลือกสำหรับ ScatterMin

คุณลักษณะสาธารณะ

การดำเนินการ

Operation operation

เอาท์พุท_อ้างอิง

::tensorflow::Output output_ref

งานสาธารณะ

กระจายมิน

 ScatterMin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates
)

กระจายมิน

 ScatterMin(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input ref,
  ::tensorflow::Input indices,
  ::tensorflow::Input updates,
  const ScatterMin::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::tensorflow::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::tensorflow::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

ใช้ล็อค

Attrs UseLocking(
  bool x
)