संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
टेंसरफ़्लो:: ऑप्स:: पहचानएन
#include <array_ops.h>
इनपुट के समान आकार और सामग्री वाले टेंसरों की एक सूची लौटाता है।
सारांश
टेंसर।
इस ऑप का उपयोग जटिल कार्यों के लिए ग्रेडिएंट को ओवरराइड करने के लिए किया जा सकता है। उदाहरण के लिए, मान लीजिए y = f(x) और हम बैकप्रॉप के लिए एक कस्टम फ़ंक्शन g लागू करना चाहते हैं जैसे कि dx = g(dy)। पायथन में,
with tf.get_default_graph().gradient_override_map(
{'IdentityN': 'OverrideGradientWithG'}):
y, _ = identity_n([f(x), x])
.RegisterGradient('OverrideGradientWithG')
def ApplyG(op, dy, _):
return [None, g(dy)] # Do not backprop to f(x).
तर्क:
रिटर्न:
-
OutputList
: आउटपुट टेंसर।
सार्वजनिक गुण
सार्वजनिक समारोह
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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::IdentityN Class Reference\n\ntensorflow::ops::IdentityN\n==========================\n\n`#include \u003carray_ops.h\u003e`\n\nReturns a list of tensors with the same shapes and contents as the input.\n\nSummary\n-------\n\ntensors.\n\nThis op can be used to override the gradient for complicated functions. For example, suppose y = f(x) and we wish to apply a custom function g for backprop such that dx = g(dy). In Python,\n\n\n```scdoc\nwith tf.get_default_graph().gradient_override_map(\n {'IdentityN': 'OverrideGradientWithG'}):\n y, _ = identity_n([f(x), x])\n```\n\n\u003cbr /\u003e\n\n\n```gas\n.RegisterGradient('OverrideGradientWithG')\ndef ApplyG(op, dy, _):\n return [None, g(dy)] # Do not backprop to f(x).\n```\n\n\u003cbr /\u003e\n\nArguments:\n\n- scope: A [Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n\n\u003cbr /\u003e\n\nReturns:\n\n- `OutputList`: The output tensor.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [IdentityN](#classtensorflow_1_1ops_1_1_identity_n_1a6643cba5b78cac36cc7b45f5e6ac03be)`(const ::`[tensorflow::Scope](/versions/r2.0/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::InputList](/versions/r2.0/api_docs/cc/class/tensorflow/input-list#classtensorflow_1_1_input_list)` input)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_identity_n_1aab1042fbd2a1eb89667e580c77cda3db) | [Operation](/versions/r2.0/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [output](#classtensorflow_1_1ops_1_1_identity_n_1adcada4788c180a31ade058caf543a8ce) | `::`[tensorflow::OutputList](/versions/r2.0/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c) |\n\n| ### Public functions ||\n|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operator[]](#classtensorflow_1_1ops_1_1_identity_n_1ab03e879700560bb229b66d06d1bccc71)`(size_t index) const ` | `::`[tensorflow::Output](/versions/r2.0/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::OutputList output\n``` \n\nPublic functions\n----------------\n\n### IdentityN\n\n```gdscript\n IdentityN(\n const ::tensorflow::Scope & scope,\n ::tensorflow::InputList input\n)\n``` \n\n### operator\\[\\]\n\n```gdscript\n::tensorflow::Output operator[](\n size_t index\n) const \n```"]]