コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
テンソルフロー::作戦::アイデンティティN
#include <array_ops.h>
入力と同じ形状と内容を持つテンソルのリストを返します。
まとめ
テンソル。
この演算は、複雑な関数の勾配をオーバーライドするために使用できます。たとえば、y = f(x) で、dx = g(dy) となるようなバックプロップにカスタム関数 g を適用したいとします。 Pythonでは、
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).
引数:
戻り値:
パブリック属性
公共機能
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 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```"]]