จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เทนเซอร์โฟลว์:: ปฏิบัติการ:: ใช้ ProximalGradientDescent
#include <training_ops.h>
อัปเดต '*var' เป็นอัลกอริทึม FOBOS ด้วยอัตราการเรียนรู้คงที่
สรุป
prox_v = var - alpha * เดลต้า var = เครื่องหมาย (prox_v)/(1+alpha*l2) * สูงสุด{|prox_v|-alpha*l1,0}
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
- var: ควรมาจากตัวแปร ()
- อัลฟา: ปัจจัยการปรับขนาด ต้องเป็นสเกลาร์
- l1: การทำให้เป็นมาตรฐาน L1 ต้องเป็นสเกลาร์
- l2: การทำให้เป็นมาตรฐาน L2 ต้องเป็นสเกลาร์
- เดลต้า: การเปลี่ยนแปลง
แอ็ตทริบิวต์ทางเลือก (ดู Attrs
):
- use_locking: ถ้าเป็น True การลบจะถูกป้องกันด้วยการล็อค มิฉะนั้นพฤติกรรมจะไม่ได้กำหนดไว้ แต่อาจแสดงความขัดแย้งน้อยลง
ผลตอบแทน:
ตัวสร้างและผู้ทำลาย |
---|
ApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input delta)
|
ApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input delta, const ApplyProximalGradientDescent::Attrs & attrs) |
คุณลักษณะสาธารณะ
งานสาธารณะ
โหนด
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ตัวดำเนินการ::tensorflow::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
ใช้ล็อค
Attrs UseLocking(
bool x
)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[],[],null,["# tensorflow::ops::ApplyProximalGradientDescent Class Reference\n\ntensorflow::ops::ApplyProximalGradientDescent\n=============================================\n\n`#include \u003ctraining_ops.h\u003e`\n\nUpdate '\\*var' as FOBOS algorithm with fixed learning rate.\n\nSummary\n-------\n\nprox_v = var - alpha \\* delta var = sign(prox_v)/(1+alpha\\*l2) \\* max{\\|prox_v\\|-alpha\\*l1,0}\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- var: Should be from a Variable().\n- alpha: Scaling factor. Must be a scalar.\n- l1: L1 regularization. Must be a scalar.\n- l2: L2 regularization. Must be a scalar.\n- delta: The change.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1_1_attrs)):\n\n- use_locking: If True, the subtraction will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): Same as \"var\".\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ApplyProximalGradientDescent](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1a577feb7c1010835d2021ec6438a03e18)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` var, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` alpha, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l1, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l2, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` delta)` ||\n| [ApplyProximalGradientDescent](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1a72d2634c5478ad4b4713e1ad81a789f9)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` var, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` alpha, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l1, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l2, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` delta, const `[ApplyProximalGradientDescent::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1aa55ca8817e188f7a4e6191b47239f67e) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [out](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1a5c78a54b7a97b4031240bd2b4f21e747) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1a8e7c76bc6bc033a17176899023e215fd)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1a1dfd24a06a5604ba3f0b372fc9936a3f)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1a9e54dc150d7c007fbef0bff785608acf)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [UseLocking](#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1a09a254600f5323028ef7d0f93ec99bab)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_apply_proximal_gradient_descent_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ApplyProximalGradientDescent::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-proximal-gradient-descent/attrs) | Optional attribute setters for [ApplyProximalGradientDescent](/versions/r1.15/api_docs/cc/class/tensorflow/ops/apply-proximal-gradient-descent#classtensorflow_1_1ops_1_1_apply_proximal_gradient_descent). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### out\n\n```text\n::tensorflow::Output out\n``` \n\nPublic functions\n----------------\n\n### ApplyProximalGradientDescent\n\n```gdscript\n ApplyProximalGradientDescent(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input var,\n ::tensorflow::Input alpha,\n ::tensorflow::Input l1,\n ::tensorflow::Input l2,\n ::tensorflow::Input delta\n)\n``` \n\n### ApplyProximalGradientDescent\n\n```gdscript\n ApplyProximalGradientDescent(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input var,\n ::tensorflow::Input alpha,\n ::tensorflow::Input l1,\n ::tensorflow::Input l2,\n ::tensorflow::Input delta,\n const ApplyProximalGradientDescent::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### UseLocking\n\n```text\nAttrs UseLocking(\n bool x\n)\n```"]]