संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: एक्युमुलेटरटेकग्रेडिएंट
#include <data_flow_ops.h>
दिए गए कंडीशनल एक्युमुलेटर में औसत ग्रेडिएंट निकालता है।
सारांश
जब तक पर्याप्त (यानी, num_required से अधिक) ग्रेडिएंट जमा नहीं हो जाते, तब तक ऑप ब्लॉक हो जाता है। यदि संचायक ने पहले से ही num_required ग्रेडिएंट्स से अधिक एकत्र कर लिया है, तो यह संचित ग्रेडिएंट्स का औसत लौटाता है। साथ ही संचायक में रिकॉर्ड किए गए ग्लोबल_स्टेप को स्वचालित रूप से 1 से बढ़ा देता है, और कुल को 0 पर रीसेट कर देता है।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- हैंडल: संचायक का हैंडल।
- num_required: किसी समुच्चय को वापस करने से पहले आवश्यक ग्रेडिएंट्स की संख्या।
- dtype: संचित ग्रेडिएंट्स का डेटा प्रकार। संचायक के प्रकार के अनुरूप होना आवश्यक है।
रिटर्न:
-
Output
: संचित ग्रेडिएंट्स का औसत।
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
,
टेंसरफ़्लो:: ऑप्स:: एक्युमुलेटरटेकग्रेडिएंट
#include <data_flow_ops.h>
दिए गए कंडीशनल एक्युमुलेटर में औसत ग्रेडिएंट निकालता है।
सारांश
जब तक पर्याप्त (यानी, num_required से अधिक) ग्रेडिएंट जमा नहीं हो जाते, तब तक ऑप ब्लॉक हो जाता है। यदि संचायक ने पहले से ही num_required ग्रेडिएंट्स से अधिक एकत्र कर लिया है, तो यह संचित ग्रेडिएंट्स का औसत लौटाता है। साथ ही संचायक में रिकॉर्ड किए गए ग्लोबल_स्टेप को स्वचालित रूप से 1 से बढ़ा देता है, और कुल को 0 पर रीसेट कर देता है।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- हैंडल: संचायक का हैंडल।
- num_required: किसी समुच्चय को वापस करने से पहले आवश्यक ग्रेडिएंट्स की संख्या।
- dtype: संचित ग्रेडिएंट्स का डेटा प्रकार। संचायक के प्रकार के अनुरूप होना आवश्यक है।
रिटर्न:
-
Output
: संचित ग्रेडिएंट्स का औसत।
सार्वजनिक गुण
सार्वजनिक समारोह
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],[],null,["# tensorflow::ops::AccumulatorTakeGradient Class Reference\n\ntensorflow::ops::AccumulatorTakeGradient\n========================================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nExtracts the average gradient in the given [ConditionalAccumulator](/versions/r2.1/api_docs/cc/class/tensorflow/ops/conditional-accumulator#classtensorflow_1_1ops_1_1_conditional_accumulator).\n\nSummary\n-------\n\nThe op blocks until sufficient (i.e., more than num_required) gradients have been accumulated. If the accumulator has already aggregated more than num_required gradients, it returns the average of the accumulated gradients. Also automatically increments the recorded global_step in the accumulator by 1, and resets the aggregate to 0.\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 an accumulator.\n- num_required: Number of gradients required before we return an aggregate.\n- dtype: The data type of accumulated gradients. Needs to correspond to the type of the accumulator.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The average of the accumulated gradients.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [AccumulatorTakeGradient](#classtensorflow_1_1ops_1_1_accumulator_take_gradient_1aa27a3882d95f8195f213544f6fd29377)`(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)` num_required, DataType dtype)` ||\n\n| ### Public attributes ||\n|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [average](#classtensorflow_1_1ops_1_1_accumulator_take_gradient_1acc0ea8ac4a347e3dfdfc93275381e25b) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_accumulator_take_gradient_1a4ded4bd0ecb0059a992e4df09f133072) | [Operation](/versions/r2.1/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_accumulator_take_gradient_1a45091b659ff109f115c9cd566637eee5)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_accumulator_take_gradient_1a86cb9d0b71e04162e4177239a36ca5dc)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_accumulator_take_gradient_1a9fd3cd7a27d7feb9205fc5e965479885)`() const ` | ` ` ` ` |\n\nPublic attributes\n-----------------\n\n### average\n\n```text\n::tensorflow::Output average\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### AccumulatorTakeGradient\n\n```gdscript\n AccumulatorTakeGradient(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input handle,\n ::tensorflow::Input num_required,\n DataType dtype\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```"]]