경고: 이 API는 더 이상 사용되지 않으며 교체가 안정되면 TensorFlow의 향후 버전에서 제거될 예정입니다.
GraphOperation
bookmark_borderbookmark
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Graph
에 노드로 추가된 Operation
에 대한 구현입니다.
GraphOperation 인스턴스는 자신이 속한 Graph
유효한 경우에만 유효합니다. 따라서 Graph.close()
호출되면 GraphOperation 인스턴스의 메서드가 IllegalStateException
과 함께 실패할 수 있습니다.
GraphOperation 인스턴스는 변경할 수 없으며 스레드로부터 안전합니다.
공개 방법
부울 | |
정수 | |
정수 | |
끈 | |
정수 | 출력 수 () 이 작업으로 생성된 텐서의 수를 반환합니다. |
<T> 출력 <T> | 출력 (int idx) 이 작업으로 생성된 텐서 중 하나에 대한 기호 핸들을 반환합니다. |
출력[] <?> | 출력 목록 (int idx, int 길이) 이 작업으로 생성된 텐서 목록에 대한 기호 핸들을 반환합니다. |
정수 | |
끈 | |
끈 | 유형 () 작업 유형, 즉 작업에 의해 수행된 계산의 이름을 반환합니다. |
공개 방법
이 작업에 대해 주어진 Tensor 입력 목록의 크기를 반환합니다.
작업에는 여러 개의 명명된 입력이 있으며 각 입력에는 단일 텐서 또는 텐서 목록이 포함됩니다. 이 메소드는 작업의 특정 명명된 입력에 대한 텐서 목록의 크기를 반환합니다.
매개변수
이름 | 이 작업에 대한 입력(많을 수 있음) 텐서 목록의 식별자입니다. |
---|
보고
- 이 명명된 입력에 의해 생성된 Tensor 목록의 크기입니다.
공개 출력 <T> 출력 (int idx)
이 작업으로 생성된 텐서 중 하나에 대한 기호 핸들을 반환합니다.
경고: 텐서의 유형이 T와 일치하는지 확인하지 않습니다. 추론되도록 허용하기보다는 명시적인 유형 매개변수를 사용하여 이 메소드를 호출하는 것이 좋습니다(예 operation.<Integer>output(0)
매개변수
idx | 이 작업으로 생성된 출력 중 출력 인덱스입니다. |
---|
공개 출력[] <?> 출력 목록 (int idx, int 길이)
이 작업으로 생성된 텐서 목록에 대한 기호 핸들을 반환합니다.
매개변수
idx | 목록의 첫 번째 텐서 인덱스 |
---|
길이 | 목록의 텐서 수 |
---|
public int outputListLength (문자열 이름)
이 작업으로 생성된 Tensor 목록의 크기를 반환합니다.
Operation에는 여러 개의 명명된 출력이 있으며, 각 출력은 단일 텐서 또는 텐서 목록을 생성합니다. 이 메소드는 작업의 특정 명명된 출력에 대한 텐서 목록의 크기를 반환합니다.
매개변수
이름 | 이 작업으로 생성된 텐서 목록(많을 수 있음)의 식별자입니다. |
---|
보고
- 이 명명된 출력에 의해 생성된 Tensor 목록의 크기입니다.
공개 문자열 유형 ()
작업 유형, 즉 작업에 의해 수행된 계산의 이름을 반환합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# GraphOperation\n\npublic final class **GraphOperation** \nImplementation for an [Operation](/api_docs/java/org/tensorflow/Operation) added as a node to a [Graph](/api_docs/java/org/tensorflow/Graph).\n\nGraphOperation instances are valid only as long as the [Graph](/api_docs/java/org/tensorflow/Graph) they are a part of is\nvalid. Thus, if [Graph.close()](/api_docs/java/org/tensorflow/Graph#close()) has been invoked, then methods on the GraphOperation\ninstance may fail with an `IllegalStateException`.\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](/api_docs/java/org/tensorflow/GraphOperation#equals(java.lang.Object))(Object o) |\n| int | [hashCode](/api_docs/java/org/tensorflow/GraphOperation#hashCode())() |\n| int | [inputListLength](/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](/api_docs/java/org/tensorflow/GraphOperation#name())() Returns the full name of the Operation. |\n| int | [numOutputs](/api_docs/java/org/tensorflow/GraphOperation#numOutputs())() Returns the number of tensors produced by this operation. |\n| \\\u003cT\\\u003e [Output](/api_docs/java/org/tensorflow/Output)\\\u003cT\\\u003e | [output](/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\\[\\]](/api_docs/java/org/tensorflow/Output)\\\u003c?\\\u003e | [outputList](/api_docs/java/org/tensorflow/GraphOperation#outputList(int,%20int))(int idx, int length) Returns symbolic handles to a list of tensors produced by this operation. |\n| int | [outputListLength](/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](/api_docs/java/org/tensorflow/GraphOperation#toString())() |\n| String | [type](/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](/api_docs/java/org/tensorflow/Operation) \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 boolean\n**equals**\n(Object o)\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| o | |\n|---|---|\n\n#### public int\n**hashCode**\n()\n\n\u003cbr /\u003e\n\n#### public 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#### public String\n**name**\n()\n\nReturns the full name of the Operation. \n\n#### public int\n**numOutputs**\n()\n\nReturns the number of tensors produced by this operation. \n\n#### public [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 [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 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#### public String\n**toString**\n()\n\n\u003cbr /\u003e\n\n#### public String\n**type**\n()\n\nReturns the type of the operation, i.e., the name of the computation performed by the\noperation."]]