tensorflow::ops::SparseApplyProximalGradientDescent

#include <training_ops.h>

การอัปเดตแบบเบาบาง '*var' เป็นอัลกอริธึม FOBOS ด้วยอัตราการเรียนรู้คงที่

สรุป

สำหรับแถวที่เราได้ทำการวัดระดับแล้ว เราจะอัปเดตตัวแปรดังนี้:

$$prox_v = var - alpha * grad$$
$$var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}$$

ข้อโต้แย้ง:

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

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

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

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

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

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

SparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices)
SparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices, const SparseApplyProximalGradientDescent::Attrs & attrs)

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

operation
out

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

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

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

UseLocking (bool x)

โครงสร้าง

tensorflow::ops::SparseApplyProximalGradientDescent::Attrs

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

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

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

Operation operation

ออก

::tensorflow::Output out

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

SparseApplyProximalGradientDescent

 SparseApplyProximalGradientDescent(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input alpha,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices
)

SparseApplyProximalGradientDescent

 SparseApplyProximalGradientDescent(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input alpha,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  const SparseApplyProximalGradientDescent::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

ใช้การล็อก

Attrs UseLocking(
  bool x
)