جریان تنسور:: عملیات:: SparseAccumulatorApplyGradient
#include <data_flow_ops.h>
یک گرادیان پراکنده را به یک انباشتگر معین اعمال می کند.
خلاصه
اگر local_step کوچکتر از global_step acumulator باشد اضافه نمی کند.
استدلال ها:
- scope: یک شی Scope
- دسته: دسته به یک انباشته.
- local_step: مقدار local_step که در آن گرادیان پراکنده محاسبه شده است.
- gradient_indices: شاخص های گرادیان پراکنده که باید جمع شوند. باید بردار باشد.
- gradient_values: مقادیر برشهای غیر صفر گرادیان هستند و باید همان بعد اول را با شاخصها داشته باشند، یعنی nnz نشاندادهشده توسط شاخصها و مقادیر باید سازگار باشد.
- gradient_shape: شکل شیب پراکنده ای که باید جمع شود.
- has_known_shape: Boolean نشان می دهد که gradient_shape ناشناخته است یا خیر، در این صورت ورودی در حین اعتبارسنجی نادیده گرفته می شود.
برمیگرداند:
-
Operation
ایجاد شده
سازندگان و ویرانگرها | |
---|---|
SparseAccumulatorApplyGradient (const :: tensorflow::Scope & scope, :: tensorflow::Input handle, :: tensorflow::Input local_step, :: tensorflow::Input gradient_indices, :: tensorflow::Input gradient_values, :: tensorflow::Input gradient_shape, bool has_known_shape) |
صفات عمومی | |
---|---|
operation |
توابع عمومی | |
---|---|
operator::tensorflow::Operation () const |
صفات عمومی
عملیات
Operation operation
توابع عمومی
SparseAccumulatorApplyGradient
SparseAccumulatorApplyGradient( const ::tensorflow::Scope & scope, ::tensorflow::Input handle, ::tensorflow::Input local_step, ::tensorflow::Input gradient_indices, ::tensorflow::Input gradient_values, ::tensorflow::Input gradient_shape, bool has_known_shape )
عملگر::tensorflow::عملیات
operator::tensorflow::Operation() const
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# tensorflow::ops::SparseAccumulatorApplyGradient Class Reference\n\ntensorflow::ops::SparseAccumulatorApplyGradient\n===============================================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nApplies a sparse gradient to a given accumulator.\n\nSummary\n-------\n\nDoes not add if local_step is smaller than the accumulator's global_step.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- handle: The handle to a accumulator.\n- local_step: The local_step value at which the sparse gradient was computed.\n- gradient_indices: Indices of the sparse gradient to be accumulated. Must be a vector.\n- gradient_values: Values are the non-zero slices of the gradient, and must have the same first dimension as indices, i.e., the nnz represented by indices and values must be consistent.\n- gradient_shape: Shape of the sparse gradient to be accumulated.\n- has_known_shape: Boolean indicating whether gradient_shape is unknown, in which case the input is ignored during validation.\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| [SparseAccumulatorApplyGradient](#classtensorflow_1_1ops_1_1_sparse_accumulator_apply_gradient_1aea8779790821fa94116859fd1dd3b604)`(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)` handle, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` local_step, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` gradient_indices, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` gradient_values, ::`[tensorflow::Input](/versions/r2.1/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` gradient_shape, bool has_known_shape)` ||\n\n| ### Public attributes ||\n|---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_sparse_accumulator_apply_gradient_1ae497952e7990fb56ce68d8add07c12c7) | [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_sparse_accumulator_apply_gradient_1a5ddfee38bced0cfafa1b427590f331ef)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### SparseAccumulatorApplyGradient\n\n```gdscript\n SparseAccumulatorApplyGradient(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input local_step,\n ::tensorflow::Input gradient_indices,\n ::tensorflow::Input gradient_values,\n ::tensorflow::Input gradient_shape,\n bool has_known_shape\n)\n``` \n\n### operator::tensorflow::Operation\n\n```gdscript\n operator::tensorflow::Operation() const \n```"]]