GraphOperation
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Graph
にノードとして追加されるOperation
の実装。
GraphOperation インスタンスは、その一部であるGraph
有効である限りのみ有効です。したがって、 close()
が呼び出されると、GraphOperation インスタンスのメソッドはIllegalStateException
で失敗する可能性があります。
GraphOperation インスタンスは不変でスレッドセーフです。
パブリックメソッド
ブール値 | |
整数 | |
整数 | |
弦 | |
整数 | 出力数() この操作によって生成されたテンソルの数を返します。 |
<T>出力<T> | 出力(int idx) この操作によって生成されたテンソルの 1 つへのシンボリック ハンドルを返します。 |
出力[] <?> | OutputList (int idx、int length) この操作によって生成されたテンソルのリストへのシンボリック ハンドルを返します。 |
整数 | |
弦 | |
弦 | タイプ() 操作のタイプ、つまり操作によって実行される計算の名前を返します。 |
継承されたメソッド
クラスjava.lang.Objectからブール値 | 等しい(オブジェクト arg0) |
最終クラス<?> | getクラス() |
整数 | ハッシュコード() |
最後の空白 | 通知する() |
最後の空白 | すべて通知() |
弦 | toString () |
最後の空白 | wait (long arg0, int arg1) |
最後の空白 | 待機(長い引数0) |
最後の空白 | 待って() |
インターフェースorg.tensorflow.Operationから抽象整数 | |
抽象文字列 | |
抽象整数 | 出力数() この操作によって生成されたテンソルの数を返します。 |
抽象 <T>出力<T> | 出力(int idx) この操作によって生成されたテンソルの 1 つへのシンボリック ハンドルを返します。 |
抽象出力[] <?> | OutputList (int idx、int length) この操作によって生成されたテンソルのリストへのシンボリック ハンドルを返します。 |
抽象整数 | |
抽象文字列 | タイプ() 操作のタイプ、つまり操作によって実行される計算の名前を返します。 |
パブリックメソッド
public booleanに等しい(オブジェクト o)
この操作の Tensor の指定された入力リストのサイズを返します。
オペレーションには複数の名前付き入力があり、それぞれに単一のテンソルまたはテンソルのリストが含まれます。このメソッドは、操作の特定の名前付き入力のテンソルのリストのサイズを返します。
パラメーター
名前 | この操作へのテンソル入力 (多数ある可能性があります) のリストの識別子。 |
---|
戻り値
- この名前付き入力によって生成される Tensor のリストのサイズ。
public int numOutputs ()
この操作によって生成されたテンソルの数を返します。
public出力<T>出力(int idx)
この操作によって生成されたテンソルの 1 つへのシンボリック ハンドルを返します。
警告: テンソルの型が T と一致するかどうかはチェックしません。このメソッドはoperation.<Integer>output(0)
など、推測させるのではなく、明示的な型パラメーターを使用して呼び出すことをお勧めします。
パラメーター
いずみ | この操作によって生成された出力の中の出力のインデックス。 |
---|
public Output[] <?> OutputList (int idx, int length)
この操作によって生成されたテンソルのリストへのシンボリック ハンドルを返します。
パラメーター
いずみ | リストの最初のテンソルのインデックス |
---|
長さ | リスト内のテンソルの数 |
---|
public int OutputListLength (文字列名)
この操作によって生成された Tensor のリストのサイズを返します。
オペレーションには複数の名前付き出力があり、それぞれが単一のテンソルまたはテンソルのリストを生成します。このメソッドは、操作の特定の名前付き出力のテンソルのリストのサイズを返します。
パラメーター
名前 | この操作によって生成されるテンソル (多数ある可能性があります) のリストの識別子。 |
---|
戻り値
- この名前付き出力によって生成される Tensor のリストのサイズ。
public String toString ()
public 文字列型()
操作のタイプ、つまり操作によって実行される計算の名前を返します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。一部のコンテンツは numpy ライセンスにより使用許諾されます。
最終更新日 2025-07-28 UTC。
[null,null,["最終更新日 2025-07-28 UTC。"],[],[],null,["# GraphOperation\n\npublic final class **GraphOperation** \n\nImplementation for an\n`\n`[Operation](/versions/r2.5/api_docs/java/org/tensorflow/Operation)`\n`\nadded as a node to a\n`\n`[Graph](/versions/r2.5/api_docs/java/org/tensorflow/Graph)`\n`\n.\n\n\nGraphOperation instances are valid only as long as the\n`\n`[Graph](/versions/r2.5/api_docs/java/org/tensorflow/Graph)`\n`\nthey are a part of is\nvalid. Thus, if\n`\n`[close()](/versions/r2.5/api_docs/java/org/tensorflow/Graph#close())`\n`\nhas been invoked, then methods on the GraphOperation\ninstance may fail with an\n`\nIllegalStateException\n`\n.\n\n\nGraphOperation instances are immutable and thread-safe.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n### Public Methods\n\n|--------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#equals(java.lang.Object)) (Object o) |\n| int | [hashCode](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#hashCode()) () |\n| int | [inputListLength](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#inputListLength(java.lang.String)) (String name) Returns the size of the given inputs list of Tensors for this operation. |\n| String | [name](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#name()) () Returns the full name of the Operation. |\n| int | [numOutputs](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#numOutputs()) () Returns the number of tensors produced by this operation. |\n| \\\u003cT\\\u003e [Output](/versions/r2.5/api_docs/java/org/tensorflow/Output) \\\u003cT\\\u003e | [output](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#output(int)) (int idx) Returns a symbolic handle to one of the tensors produced by this operation. |\n| [Output\\[\\]](/versions/r2.5/api_docs/java/org/tensorflow/Output) \\\u003c?\\\u003e | [outputList](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#outputList(int, int)) (int idx, int length) Returns symbolic handles to a list of tensors produced by this operation. |\n| int | [outputListLength](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#outputListLength(java.lang.String)) (String name) Returns the size of the list of Tensors produced by this operation. |\n| String | [toString](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#toString()) () |\n| String | [type](/versions/r2.5/api_docs/java/org/tensorflow/GraphOperation#type()) () Returns the type of the operation, i.e., the name of the computation performed by the operation. |\n\n### Inherited Methods\n\nFrom class java.lang.Object \n\n|------------------|----------------------------|\n| boolean | equals (Object arg0) |\n| final Class\\\u003c?\\\u003e | getClass () |\n| int | hashCode () |\n| final void | notify () |\n| final void | notifyAll () |\n| String | toString () |\n| final void | wait (long arg0, int arg1) |\n| final void | wait (long arg0) |\n| final void | wait () |\n\nFrom interface [org.tensorflow.Operation](/versions/r2.5/api_docs/java/org/tensorflow/Operation) \n\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [inputListLength](/versions/r2.5/api_docs/java/org/tensorflow/Operation#inputListLength(java.lang.String)) (String name) Returns the size of the given inputs list of Tensors for this operation. |\n| abstract String | [name](/versions/r2.5/api_docs/java/org/tensorflow/Operation#name()) () Returns the full name of the Operation. |\n| abstract int | [numOutputs](/versions/r2.5/api_docs/java/org/tensorflow/Operation#numOutputs()) () Returns the number of tensors produced by this operation. |\n| abstract \\\u003cT\\\u003e [Output](/versions/r2.5/api_docs/java/org/tensorflow/Output) \\\u003cT\\\u003e | [output](/versions/r2.5/api_docs/java/org/tensorflow/Operation#output(int)) (int idx) Returns a symbolic handle to one of the tensors produced by this operation. |\n| abstract [Output\\[\\]](/versions/r2.5/api_docs/java/org/tensorflow/Output) \\\u003c?\\\u003e | [outputList](/versions/r2.5/api_docs/java/org/tensorflow/Operation#outputList(int, int)) (int idx, int length) Returns symbolic handles to a list of tensors produced by this operation. |\n| abstract int | [outputListLength](/versions/r2.5/api_docs/java/org/tensorflow/Operation#outputListLength(java.lang.String)) (String name) Returns the size of the list of Tensors produced by this operation. |\n| abstract String | [type](/versions/r2.5/api_docs/java/org/tensorflow/Operation#type()) () Returns the type of the operation, i.e., the name of the computation performed by the operation. |\n\nPublic Methods\n--------------\n\n\n#### public boolean\n**equals**\n(Object o)\n\n\n#### public int\n**hashCode**\n()\n\n\n#### public int\n**inputListLength**\n(String name)\n\n\nReturns the size of the given inputs list of Tensors for this operation.\n\n\nAn Operation has multiple named inputs, each of which contains either a single tensor or a\nlist of tensors. This method returns the size of the list of tensors for a specific named input\nof the operation.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| name | identifier of the list of tensors (of which there may be many) inputs to this operation. |\n|------|------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- the size of the list of Tensors produced by this named input.\n\n#### public String\n**name**\n()\n\n\nReturns the full name of the Operation.\n\n#### public int\n**numOutputs**\n()\n\n\nReturns the number of tensors produced by this operation.\n\n#### public [Output](/versions/r2.5/api_docs/java/org/tensorflow/Output) \\\u003cT\\\u003e\n**output**\n(int idx)\n\n\nReturns a symbolic handle to one of the tensors produced by this operation.\n\n\nWarning: Does not check that the type of the tensor matches T. It is recommended to call\nthis method with an explicit type parameter rather than letting it be inferred, e.g.\n`\noperation.\u003cInteger\u003eoutput(0)\n`\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| idx | The index of the output among the outputs produced by this operation. |\n|-----|-----------------------------------------------------------------------|\n\n\n#### public [Output\\[\\]](/versions/r2.5/api_docs/java/org/tensorflow/Output) \\\u003c?\\\u003e\n**outputList**\n(int idx, int length)\n\n\nReturns symbolic handles to a list of tensors produced by this operation. \n\n##### Parameters\n\n| idx | index of the first tensor of the list |\n| length | number of tensors in the list |\n|--------|---------------------------------------|\n\n##### Returns\n\n- array of `\n Output\n `\n\n#### public int\n**outputListLength**\n(String name)\n\n\nReturns the size of the list of Tensors produced by this operation.\n\n\nAn Operation has multiple named outputs, each of which produces either a single tensor or a\nlist of tensors. This method returns the size of the list of tensors for a specific named\noutput of the operation.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| name | identifier of the list of tensors (of which there may be many) produced by this operation. |\n|------|--------------------------------------------------------------------------------------------|\n\n##### Returns\n\n- the size of the list of Tensors produced by this named output.\n\n#### public String\n**toString**\n()\n\n\n#### public String\n**type**\n()\n\n\nReturns the type of the operation, i.e., the name of the computation performed by the\noperation."]]