tensorflow::ops::SparseApplyAdagrad

#include <training_ops.h>

อัปเดตรายการที่เกี่ยวข้องใน '*var' และ '*accum' ตามรูปแบบ adagrad

สรุป

สำหรับแถวที่เรามีข้อมูลการสำเร็จการศึกษา เราจะอัปเดตค่าตัวแปรและค่าสะสมดังนี้: $$accum += grad * grad$$ $$var -= lr * grad * (1 / sqrt(accum))$$

ข้อโต้แย้ง:

  • ขอบเขต: วัตถุ ขอบเขต
  • var: ควรมาจาก Variable()
  • accum: ควรมาจาก Variable()
  • lr: อัตราการเรียนรู้ ต้องเป็นค่าคงที่ (scalar)
  • grad: ค่าความชัน
  • ดัชนี: เวกเตอร์ของดัชนีในมิติแรกของ var และ accum

คุณลักษณะเสริม (ดูที่ Attrs ):

  • use_locking: หากตั้งค่า True การอัปเดตเทนเซอร์ var และ accum จะได้รับการป้องกันด้วยการล็อก มิเช่นนั้นพฤติกรรมจะไม่แน่นอน แต่การแย่งชิงทรัพยากรอาจน้อยลง

การส่งคืนสินค้า:

  • Output : เหมือนกับ "var"

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

SparseApplyAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices)
SparseApplyAdagrad (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input indices, const SparseApplyAdagrad::Attrs & attrs)

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

operation
out

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

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

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

UpdateSlots (bool x)
UseLocking (bool x)

โครงสร้าง

tensorflow::ops::SparseApplyAdagrad::Attrs

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

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

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

Operation operation

ออก

::tensorflow::Output out

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

SparseApplyAdagrad

 SparseApplyAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices
)

SparseApplyAdagrad

 SparseApplyAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  const SparseApplyAdagrad::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

อัปเดตสล็อต

Attrs UpdateSlots(
  bool x
)

ใช้การล็อก

Attrs UseLocking(
  bool x
)