경고: 이 API는 더 이상 사용되지 않으며 교체가 안정되면 TensorFlow의 향후 버전에서 제거될 예정입니다.
EagerSession.Options
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
상속된 메서드
java.lang.Object 클래스에서 부울 | 같음 (개체 arg0) |
마지막 수업<?> | getClass () |
정수 | 해시 코드 () |
최종 무효 | 알림 () |
최종 무효 | 통지모두 () |
끈 | toString () |
최종 무효 | 대기 (long arg0, int arg1) |
최종 무효 | 기다리세요 (긴 arg0) |
최종 무효 | 기다리다 () |
공개 방법
디스패치된 작업이 실제로 실행되는 방식을 제어합니다.
true로 설정하면 각 작업이 비동기식으로 실행됩니다(이 경우 일부 작업은 "준비되지 않은" 출력을 반환할 수 있음). false로 설정하면 모든 작업이 동기적으로 실행됩니다.
기본적으로 동기 실행이 사용됩니다.
매개변수
값 | 비동기 실행의 경우 true이고 동기 실행의 경우 false입니다. |
---|
선택한 옵션으로 Eager 세션을 구축합니다.
직렬화된 TensorFlow 구성 proto인 제공된 버퍼에 있는 데이터를 기반으로 세션을 구성합니다.
경고: TensorFlow proto는 향후 공개 엔드포인트에서 지원되지 않을 수 있으므로 이 기능 지원은 변경될 수 있습니다.
참조: config.proto
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[],[],null,["# EagerSession.Options\n\npublic static class **EagerSession.Options** \n\n### Public Methods\n\n|----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options) | [async](/api_docs/java/org/tensorflow/EagerSession.Options#async(boolean))(boolean value) Controls how operations dispatched are actually executed. |\n| [EagerSession](/api_docs/java/org/tensorflow/EagerSession) | [build](/api_docs/java/org/tensorflow/EagerSession.Options#build())() Builds an eager session with the selected options. |\n| [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options) | [config](/api_docs/java/org/tensorflow/EagerSession.Options#config(byte[]))(byte\\[\\] value) Configures the session based on the data found in the provided buffer, which is serialized TensorFlow config proto. |\n| [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options) | [devicePlacementPolicy](/api_docs/java/org/tensorflow/EagerSession.Options#devicePlacementPolicy(org.tensorflow.EagerSession.DevicePlacementPolicy))([EagerSession.DevicePlacementPolicy](/api_docs/java/org/tensorflow/EagerSession.DevicePlacementPolicy) value) Controls how to act when we try to run an operation on a given device but some input tensors are not on that device. |\n| [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options) | [resourceCleanupStrategy](/api_docs/java/org/tensorflow/EagerSession.Options#resourceCleanupStrategy(org.tensorflow.EagerSession.ResourceCleanupStrategy))([EagerSession.ResourceCleanupStrategy](/api_docs/java/org/tensorflow/EagerSession.ResourceCleanupStrategy) value) Controls how TensorFlow resources are cleaned up when no longer needed. |\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\nPublic Methods\n--------------\n\n#### public [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options)\n**async**\n(boolean value)\n\nControls how operations dispatched are actually executed.\n\nWhen set to true, each operation are executed asynchronously (in which case some\noperations might return \"non-ready\" outputs). When set to false, all operations are executed\nsynchronously.\n\nSynchronous execution is used by default.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| value | true for asynchronous execution, false for synchronous. |\n|-------|---------------------------------------------------------|\n\n#### public [EagerSession](/api_docs/java/org/tensorflow/EagerSession)\n**build**\n()\n\nBuilds an eager session with the selected options. \n\n#### public [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options)\n**config**\n(byte\\[\\] value)\n\nConfigures the session based on the data found in the provided buffer, which is serialized\nTensorFlow config proto.\n\nWarning: the support of this feature is subject to changes since TensorFlow protos might\nnot be supported on public endpoints in the future.\n\nSee also: [config.proto](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/protobuf/config.proto)\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| value | a serialized config proto |\n|-------|---------------------------|\n\n#### public [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options)\n**devicePlacementPolicy**\n([EagerSession.DevicePlacementPolicy](/api_docs/java/org/tensorflow/EagerSession.DevicePlacementPolicy) value)\n\nControls how to act when we try to run an operation on a given device but some input tensors\nare not on that device.\n\n[EagerSession.DevicePlacementPolicy.SILENT](/api_docs/java/org/tensorflow/EagerSession.DevicePlacementPolicy#SILENT) is used by default.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| value | policy to apply |\n|-------|-----------------|\n\n##### See Also\n\n- [EagerSession.DevicePlacementPolicy](/api_docs/java/org/tensorflow/EagerSession.DevicePlacementPolicy) \n\n#### public [EagerSession.Options](/api_docs/java/org/tensorflow/EagerSession.Options)\n**resourceCleanupStrategy**\n([EagerSession.ResourceCleanupStrategy](/api_docs/java/org/tensorflow/EagerSession.ResourceCleanupStrategy) value)\n\nControls how TensorFlow resources are cleaned up when no longer needed.\n\n[EagerSession.ResourceCleanupStrategy.IN_BACKGROUND](/api_docs/java/org/tensorflow/EagerSession.ResourceCleanupStrategy#IN_BACKGROUND) is used by default.\n\n\u003cbr /\u003e\n\n##### Parameters\n\n| value | strategy to use |\n|-------|-----------------|\n\n##### See Also\n\n- [EagerSession.ResourceCleanupStrategy](/api_docs/java/org/tensorflow/EagerSession.ResourceCleanupStrategy)"]]