संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: रिसोर्सस्पार्सएप्लाईप्रॉक्सिमलग्रैडिएंटडिसेंट
#include <training_ops.h>
निश्चित सीखने की दर के साथ एफओबीओएस एल्गोरिदम के रूप में विरल अद्यतन '*var'।
सारांश
यानी उन पंक्तियों के लिए जिनके लिए हमारे पास ग्रेड है, हम var को इस प्रकार अपडेट करते हैं: prox_v = var - alpha * grad var =sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- var: एक वेरिएबल() से होना चाहिए।
- अल्फा: स्केलिंग कारक। एक अदिश राशि होनी चाहिए.
- एल1: एल1 नियमितीकरण। एक अदिश राशि होनी चाहिए.
- एल2: एल2 नियमितीकरण। एक अदिश राशि होनी चाहिए.
- ग्रेड: ग्रेडिएंट.
- सूचकांक: var और accum के पहले आयाम में सूचकांकों का एक वेक्टर।
वैकल्पिक विशेषताएँ (देखें Attrs
):
- उपयोग_लॉकिंग: यदि सत्य है, तो घटाव को लॉक द्वारा संरक्षित किया जाएगा; अन्यथा व्यवहार अपरिभाषित है, लेकिन कम विवाद प्रदर्शित कर सकता है।
रिटर्न:
निर्माता और विध्वंसक |
---|
ResourceSparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices)
|
ResourceSparseApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input grad, :: tensorflow::Input indices, const ResourceSparseApplyProximalGradientDescent::Attrs & attrs) |
सार्वजनिक गुण
सार्वजनिक समारोह
ऑपरेटर::टेन्सरफ़्लो::ऑपरेशन
operator::tensorflow::Operation() const
सार्वजनिक स्थैतिक कार्य
लॉकिंग का उपयोग करें
Attrs UseLocking(
bool x
)
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["# tensorflow::ops::ResourceSparseApplyProximalGradientDescent Class Reference\n\ntensorflow::ops::ResourceSparseApplyProximalGradientDescent\n===========================================================\n\n`#include \u003ctraining_ops.h\u003e`\n\nSparse update '\\*var' as FOBOS algorithm with fixed learning rate.\n\nSummary\n-------\n\nThat is for rows we have grad for, we update var as follows: prox_v = var - alpha \\* grad 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- grad: The gradient.\n- indices: A vector of indices into the first dimension of var and accum.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_resource_sparse_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- the created [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ResourceSparseApplyProximalGradientDescent](#classtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent_1a045bee13c19911e4f7a40bfe1366c6e1)`(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)` grad, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices)` ||\n| [ResourceSparseApplyProximalGradientDescent](#classtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent_1afac4191272f3b8d9d42cf0adb1b5427b)`(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)` grad, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` indices, const `[ResourceSparseApplyProximalGradientDescent::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent_1a378316d23cd77b905128227192e3b10c) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|\n| [operator::tensorflow::Operation](#classtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent_1ad6ed2bcb828502eb8831b972afe172f3)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [UseLocking](#classtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent_1a9dcb62b192d34bba83cb6cfc7026ee55)`(bool x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent_1_1_attrs) |\n\n| ### Structs ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ResourceSparseApplyProximalGradientDescent::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/resource-sparse-apply-proximal-gradient-descent/attrs) | Optional attribute setters for [ResourceSparseApplyProximalGradientDescent](/versions/r1.15/api_docs/cc/class/tensorflow/ops/resource-sparse-apply-proximal-gradient-descent#classtensorflow_1_1ops_1_1_resource_sparse_apply_proximal_gradient_descent). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### ResourceSparseApplyProximalGradientDescent\n\n```gdscript\n ResourceSparseApplyProximalGradientDescent(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input var,\n ::tensorflow::Input alpha,\n ::tensorflow::Input l1,\n ::tensorflow::Input l2,\n ::tensorflow::Input grad,\n ::tensorflow::Input indices\n)\n``` \n\n### ResourceSparseApplyProximalGradientDescent\n\n```gdscript\n ResourceSparseApplyProximalGradientDescent(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input var,\n ::tensorflow::Input alpha,\n ::tensorflow::Input l1,\n ::tensorflow::Input l2,\n ::tensorflow::Input grad,\n ::tensorflow::Input indices,\n const ResourceSparseApplyProximalGradientDescent::Attrs & attrs\n)\n``` \n\n### operator::tensorflow::Operation\n\n```gdscript\n operator::tensorflow::Operation() const \n``` \n\nPublic static functions\n-----------------------\n\n### UseLocking\n\n```text\nAttrs UseLocking(\n bool x\n)\n```"]]