tensorflow::ops::ScatterMul

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

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

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

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

operation
output_ref

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

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

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

UseLocking (bool x)

โครงสร้าง

tensorflow::ops::ScatterMul::Attrs

ตัวเลือกการตั้งค่าแอตทริบิวต์สำหรับ ScatterMul ( ไม่จำเป็น)

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

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

Operation operation

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

::tensorflow::Output output_ref

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

สแคตเตอร์มัล

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

สแคตเตอร์มัล

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

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

ใช้การล็อก

Attrs UseLocking(
  bool x
)