संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: सशर्त संचायक
#include <data_flow_ops.h>
ग्रेडिएंट्स को एकत्र करने के लिए एक सशर्त संचायक।
सारांश
संचायक संचायक को ज्ञात नवीनतम ग्लोबल_स्टेप से अधिक या उसके बराबर local_step के साथ चिह्नित ग्रेडिएंट को स्वीकार करता है। औसत संचायक से निकाला जा सकता है, बशर्ते पर्याप्त ग्रेडिएंट जमा हो गए हों। औसत निकालने से कुल योग स्वचालित रूप से 0 पर रीसेट हो जाता है, और संचायक द्वारा रिकॉर्ड किया गया ग्लोबल_स्टेप बढ़ जाता है।
तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
- dtype: संचित होने वाले मूल्य का प्रकार।
- आकार: मानों का आकार, [] हो सकता है, इस स्थिति में आकार अज्ञात है।
वैकल्पिक विशेषताएँ (देखें Attrs
):
- कंटेनर: यदि खाली नहीं है, तो इस संचायक को दिए गए कंटेनर में रखा जाता है। अन्यथा, एक डिफ़ॉल्ट कंटेनर का उपयोग किया जाता है।
- साझा_नाम: यदि खाली नहीं है, तो यह संचायक दिए गए नाम के तहत कई सत्रों में साझा किया जाएगा।
रिटर्न:
सार्वजनिक गुण
सार्वजनिक समारोह
सशर्त संचायक
ConditionalAccumulator(
const ::tensorflow::Scope & scope,
DataType dtype,
PartialTensorShape shape
)
नोड
::tensorflow::Node * node() const
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const
सार्वजनिक स्थैतिक कार्य
पात्र
Attrs Container(
StringPiece x
)
न्यूनीकरण प्रकार
Attrs ReductionType(
StringPiece x
)
साझानाम
Attrs SharedName(
StringPiece x
)
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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::ConditionalAccumulator Class Reference\n\ntensorflow::ops::ConditionalAccumulator\n=======================================\n\n`#include \u003cdata_flow_ops.h\u003e`\n\nA conditional accumulator for aggregating gradients.\n\nSummary\n-------\n\nThe accumulator accepts gradients marked with local_step greater or equal to the most recent global_step known to the accumulator. The average can be extracted from the accumulator, provided sufficient gradients have been accumulated. Extracting the average automatically resets the aggregate to 0, and increments the global_step recorded by the accumulator.\n\nArguments:\n\n- scope: A [Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- dtype: The type of the value being accumulated.\n- shape: The shape of the values, can be \\[\\], in which case shape is unknown.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_conditional_accumulator_1_1_attrs)):\n\n- container: If non-empty, this accumulator is placed in the given container. Otherwise, a default container is used.\n- shared_name: If non-empty, this accumulator will be shared under the given name across multiple sessions.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): The handle to the accumulator.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [ConditionalAccumulator](#classtensorflow_1_1ops_1_1_conditional_accumulator_1a00272ac1cf0b035368cf3635f63f6a08)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, DataType dtype, PartialTensorShape shape)` ||\n| [ConditionalAccumulator](#classtensorflow_1_1ops_1_1_conditional_accumulator_1a081e21332352a96375526ce070986ebd)`(const ::`[tensorflow::Scope](/versions/r2.1/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, DataType dtype, PartialTensorShape shape, const `[ConditionalAccumulator::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_conditional_accumulator_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [handle](#classtensorflow_1_1ops_1_1_conditional_accumulator_1ac3a749ba3341a49ef50a14057e5da60a) | `::`[tensorflow::Output](/versions/r2.1/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n| [operation](#classtensorflow_1_1ops_1_1_conditional_accumulator_1a30b98b6dbd156f113d937ac4275ad048) | [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_conditional_accumulator_1a9cc82ba20297c140bf9f35fe3b6c0ae8)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_conditional_accumulator_1ade4edaefa0b8521b19f8520a78138955)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_conditional_accumulator_1a1dd93d35edd3bcc2637ffa77017bf8cb)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|--------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Container](#classtensorflow_1_1ops_1_1_conditional_accumulator_1acaa49be6762015a74847412f577808c1)`(StringPiece x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_conditional_accumulator_1_1_attrs) |\n| [ReductionType](#classtensorflow_1_1ops_1_1_conditional_accumulator_1a59688e0c97eee5de1ead933f6f8c7815)`(StringPiece x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_conditional_accumulator_1_1_attrs) |\n| [SharedName](#classtensorflow_1_1ops_1_1_conditional_accumulator_1aa2dce8224a78a988a81866ca421eb42b)`(StringPiece x)` | [Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/conditional-accumulator/attrs#structtensorflow_1_1ops_1_1_conditional_accumulator_1_1_attrs) |\n\n| ### Structs ||\n|----------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::ConditionalAccumulator::Attrs](/versions/r2.1/api_docs/cc/struct/tensorflow/ops/conditional-accumulator/attrs) | Optional attribute setters for [ConditionalAccumulator](/versions/r2.1/api_docs/cc/class/tensorflow/ops/conditional-accumulator#classtensorflow_1_1ops_1_1_conditional_accumulator). |\n\nPublic attributes\n-----------------\n\n### handle\n\n```text\n::tensorflow::Output handle\n``` \n\n### operation\n\n```text\nOperation operation\n``` \n\nPublic functions\n----------------\n\n### ConditionalAccumulator\n\n```gdscript\n ConditionalAccumulator(\n const ::tensorflow::Scope & scope,\n DataType dtype,\n PartialTensorShape shape\n)\n``` \n\n### ConditionalAccumulator\n\n```gdscript\n ConditionalAccumulator(\n const ::tensorflow::Scope & scope,\n DataType dtype,\n PartialTensorShape shape,\n const ConditionalAccumulator::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### Container\n\n```text\nAttrs Container(\n StringPiece x\n)\n``` \n\n### ReductionType\n\n```text\nAttrs ReductionType(\n StringPiece x\n)\n``` \n\n### SharedName\n\n```text\nAttrs SharedName(\n StringPiece x\n)\n```"]]