tensorflow::ops::ScatterMax

#include <state_ops.h>

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

สรุป

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

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

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

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

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

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

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

operation
output_ref

หน้าที่สาธารณะ

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

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

UseLocking (bool x)

โครงสร้าง

tensorflow::ops::ScatterMax::Attrs

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

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

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

Operation operation

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

::tensorflow::Output output_ref

หน้าที่สาธารณะ

สแคตเตอร์แม็กซ์

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

สแคตเตอร์แม็กซ์

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

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const 

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

ใช้การล็อก

Attrs UseLocking(
  bool x
)