tensorflow::ops::ScatterSub

#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 ส่งคืนเพื่อความสะดวกในการดำเนินการที่ต้องการใช้ค่าที่อัปเดตแล้วหลังจากทำการอัปเดตเสร็จสิ้น

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

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

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

operation
output_ref

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

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

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

UseLocking (bool x)

โครงสร้าง

tensorflow::ops::ScatterSub::Attrs

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

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

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

Operation operation

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

::tensorflow::Output output_ref

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

สแคตเตอร์ซับ

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

สแคตเตอร์ซับ

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

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

ใช้การล็อก

Attrs UseLocking(
  bool x
)