警告:この API は非推奨であり、置き換えが安定した後の TensorFlow の将来のバージョンでは削除される予定です。
Operation
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Tensor で計算を実行します。
Operation は、0 個以上のTensor
(他の Operations によって生成された) を入力として受け取り、0 個以上のTensor
を出力として生成します。
パブリックメソッド
抽象整数 | |
抽象文字列 | |
抽象整数 | 出力数() この操作によって生成されたテンソルの数を返します。 |
抽象 <T>出力<T> | 出力(int idx) この操作によって生成されたテンソルの 1 つへのシンボリック ハンドルを返します。 |
抽象出力[] <?> | OutputList (int idx、int length) この操作によって生成されたテンソルのリストへのシンボリック ハンドルを返します。 |
抽象整数 | |
抽象文字列 | タイプ() 操作のタイプ、つまり操作によって実行される計算の名前を返します。 |
パブリックメソッド
この操作の Tensor の指定された入力リストのサイズを返します。
オペレーションには複数の名前付き入力があり、それぞれに単一のテンソルまたはテンソルのリストが含まれます。このメソッドは、操作の特定の名前付き入力のテンソルのリストのサイズを返します。
パラメーター
名前 | この操作へのテンソル入力 (多数ある可能性があります) のリストの識別子。 |
---|
戻り値
- この名前付き入力によって生成される Tensor のリストのサイズ。
投げる
IllegalArgumentException | この操作に指定された名前の入力がない場合。 |
---|
パブリック抽象 int numOutputs ()
この操作によって生成されたテンソルの数を返します。
public abstract出力<T>出力(int idx)
この操作によって生成されたテンソルの 1 つへのシンボリック ハンドルを返します。
警告: テンソルの型が T と一致するかどうかはチェックしません。このメソッドoperation.<Integer>output(0)
のように推測させるのではなく、明示的な型パラメーターを使用して呼び出すことをお勧めします。
パラメーター
いずみ | この操作によって生成された出力の中の出力のインデックス。 |
---|
public abstract Output[] <?> OutputList (int idx, int length)
この操作によって生成されたテンソルのリストへのシンボリック ハンドルを返します。
パラメーター
いずみ | リストの最初のテンソルのインデックス |
---|
長さ | リスト内のテンソルの数 |
---|
public abstract int OutputListLength (文字列名)
この操作によって生成された Tensor のリストのサイズを返します。
オペレーションには複数の名前付き出力があり、それぞれが単一のテンソルまたはテンソルのリストを生成します。このメソッドは、操作の特定の名前付き出力のテンソルのリストのサイズを返します。
パラメーター
名前 | この操作によって生成されるテンソル (多数ある可能性があります) のリストの識別子。 |
---|
戻り値
- この名前付き出力によって生成される Tensor のリストのサイズ。
投げる
IllegalArgumentException | この操作に指定された名前の出力がない場合。 |
---|
public abstract String型()
操作のタイプ、つまり操作によって実行される計算の名前を返します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[],[],null,["# Operation\n\npublic interface **Operation** \n\n|---|---|---|\n| Known Indirect Subclasses [GraphOperation](/api_docs/java/org/tensorflow/GraphOperation) |----------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------| | [GraphOperation](/api_docs/java/org/tensorflow/GraphOperation) | Implementation for an [Operation](/api_docs/java/org/tensorflow/Operation) added as a node to a [Graph](/api_docs/java/org/tensorflow/Graph). | |||\n\nPerforms computation on Tensors.\n\nAn Operation takes zero or more [Tensor](/api_docs/java/org/tensorflow/Tensor)s (produced by other Operations) as input, and\nproduces zero or more [Tensor](/api_docs/java/org/tensorflow/Tensor)s as output.\n\n\u003cbr /\u003e\n\n### Public Methods\n\n|--------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract int | [inputListLength](/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](/api_docs/java/org/tensorflow/Operation#name())() Returns the full name of the Operation. |\n| abstract int | [numOutputs](/api_docs/java/org/tensorflow/Operation#numOutputs())() Returns the number of tensors produced by this operation. |\n| abstract \\\u003cT\\\u003e [Output](/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e | [output](/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\\[\\]](/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e | [outputList](/api_docs/java/org/tensorflow/Operation#outputList(int,%20int))(int idx, int length) Returns symbolic handles to a list of tensors produced by this operation. |\n| abstract int | [outputListLength](/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](/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#### public abstract int\n**inputListLength**\n(String name)\n\nReturns the size of the given inputs list of Tensors for this operation.\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##### Throws\n\n| IllegalArgumentException | if this operation has no input with the provided name. |\n|--------------------------|--------------------------------------------------------|\n\n#### public abstract String\n**name**\n()\n\nReturns the full name of the Operation. \n\n#### public abstract int\n**numOutputs**\n()\n\nReturns the number of tensors produced by this operation. \n\n#### public abstract [Output](/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e\n**output**\n(int idx)\n\nReturns a symbolic handle to one of the tensors produced by this operation.\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. `operation.<Integer>output(0)`\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#### public abstract [Output\\[\\]](/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e\n**outputList**\n(int idx, int length)\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 `Output` \n\n#### public abstract int\n**outputListLength**\n(String name)\n\nReturns the size of the list of Tensors produced by this operation.\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##### Throws\n\n| IllegalArgumentException | if this operation has no output with the provided name. |\n|--------------------------|---------------------------------------------------------|\n\n#### public abstract String\n**type**\n()\n\nReturns the type of the operation, i.e., the name of the computation performed by the\noperation."]]