جریان تنسور:: عملیات:: ResourceApplyProximalGradientDescent
#include <training_ops.h>
"*var" را به عنوان الگوریتم FOBOS با نرخ یادگیری ثابت به روز کنید.
خلاصه
prox_v = var - alpha * delta var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}
استدلال ها:
- scope: یک شی Scope
- var: باید از یک متغیر () باشد.
- آلفا: ضریب مقیاس. باید اسکالر باشد.
- l1: تنظیم L1. باید اسکالر باشد.
- l2: تنظیم L2. باید اسکالر باشد.
- دلتا: تغییر.
ویژگی های اختیاری (به Attrs
مراجعه کنید):
- use_locking: اگر True باشد، تفریق با یک قفل محافظت می شود. در غیر این صورت رفتار تعریف نشده است، اما ممکن است اختلاف کمتری از خود نشان دهد.
برمی گرداند:
-
Operation
ایجاد شده
سازندگان و تخریب کنندگان | |
---|---|
ResourceApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input delta) | |
ResourceApplyProximalGradientDescent (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input alpha, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input delta, const ResourceApplyProximalGradientDescent::Attrs & attrs) |
صفات عمومی | |
---|---|
operation |
توابع عمومی | |
---|---|
operator::tensorflow::Operation () const |
توابع استاتیک عمومی | |
---|---|
UseLocking (bool x) |
سازه ها | |
---|---|
tensorflow:: ops:: ResourceApplyProximalGradientDescent:: Attrs | تنظیم کننده های ویژگی اختیاری برای ResourceApplyProximalGradientDescent . |
صفات عمومی
عملیات
Operation operation
توابع عمومی
ResourceApplyProximalGradientDescent
ResourceApplyProximalGradientDescent( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input delta )
ResourceApplyProximalGradientDescent
ResourceApplyProximalGradientDescent( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input delta, const ResourceApplyProximalGradientDescent::Attrs & attrs )
عملگر::tensorflow::عملیات
operator::tensorflow::Operation() const
توابع استاتیک عمومی
استفاده از قفل
Attrs UseLocking( bool x )
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# tensorflow::ops::ResourceApplyProximalGradientDescent Class Reference\n\ntensorflow::ops::ResourceApplyProximalGradientDescent\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/r2.1/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/r2.1/api_docs/cc/struct/tensorflow/ops/resource-apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_resource_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/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ResourceApplyProximalGradientDescent](#classtensorflow_1_1ops_1_1_resource_apply_proximal_gradient_descent_1abbddad3b19f5766ee3e968f1a6b9567f)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` var, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` alpha, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l1, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l2, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` delta)` ||\n| [ResourceApplyProximalGradientDescent](#classtensorflow_1_1ops_1_1_resource_apply_proximal_gradient_descent_1a1b5470e569118e2bf85f8a80d6040ee7)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` var, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` alpha, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l1, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` l2, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` delta, const `[ResourceApplyProximalGradientDescent::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/resource-apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_resource_apply_proximal_gradient_descent_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_resource_apply_proximal_gradient_descent_1af16b611d7b02d65580a0234c5b815121) | [Operation](/versions/r2.1/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_apply_proximal_gradient_descent_1aaa85fb3ffe460dccaefcf263dc6f95f3)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [UseLocking](#classtensorflow_1_1ops_1_1_resource_apply_proximal_gradient_descent_1a6f9bcba3123d814dc2aeed6987d46e8b)`(bool x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/resource-apply-proximal-gradient-descent/attrs#structtensorflow_1_1ops_1_1_resource_apply_proximal_gradient_descent_1_1_attrs) |\n\n| ### Structs ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ResourceApplyProximalGradientDescent::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/resource-apply-proximal-gradient-descent/attrs) | Optional attribute setters for [ResourceApplyProximalGradientDescent](/versions/r2.1/api_docs/cc/class/tensorflow/ops/resource-apply-proximal-gradient-descent#classtensorflow_1_1ops_1_1_resource_apply_proximal_gradient_descent). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### ResourceApplyProximalGradientDescent\n\n```gdscript\n ResourceApplyProximalGradientDescent(\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### ResourceApplyProximalGradientDescent\n\n```gdscript\n ResourceApplyProximalGradientDescent(\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 ResourceApplyProximalGradientDescent::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```"]]