Warning: This API is deprecated and will be removed in a future
version of TensorFlow after
the replacement is stable.
EagerSession.Options
Stay organized with collections
Save and categorize content based on your preferences.
Inherited Methods
From class
java.lang.Object
boolean
|
equals(Object arg0)
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
Public Methods
Controls how operations dispatched are actually executed.
When set to true, each operation are executed asynchronously (in which case some
operations might return "non-ready" outputs). When set to false, all operations are executed
synchronously.
Synchronous execution is used by default.
Parameters
value |
true for asynchronous execution, false for synchronous.
|
Builds an eager session with the selected options.
Configures the session based on the data found in the provided buffer, which is serialized
TensorFlow config proto.
Warning: the support of this feature is subject to changes since TensorFlow protos might
not be supported on public endpoints in the future.
See also: config.proto
Parameters
value |
a serialized config proto
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-02-12 UTC.
[null,null,["Last updated 2022-02-12 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)"]]