public static class EagerSession.Options extends Object
Modifier and Type | Method and Description |
---|---|
EagerSession.Options |
async(boolean value)
Controls how operations dispatched are actually executed.
|
EagerSession |
build()
Builds an eager session with the selected options.
|
EagerSession.Options |
config(byte[] value)
Configures the session based on the data found in the provided buffer, which is serialized
TensorFlow config proto.
|
EagerSession.Options |
devicePlacementPolicy(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.
|
EagerSession.Options |
resourceCleanupStrategy(EagerSession.ResourceCleanupStrategy value)
Controls how TensorFlow resources are cleaned up when no longer needed.
|
public EagerSession.Options async(boolean value)
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.
value
- true for asynchronous execution, false for synchronous.public EagerSession.Options devicePlacementPolicy(EagerSession.DevicePlacementPolicy value)
EagerSession.DevicePlacementPolicy.SILENT
is used by default.
value
- policy to applyEagerSession.DevicePlacementPolicy
public EagerSession.Options resourceCleanupStrategy(EagerSession.ResourceCleanupStrategy value)
EagerSession.ResourceCleanupStrategy.IN_BACKGROUND
is used by default.
value
- strategy to useEagerSession.ResourceCleanupStrategy
public EagerSession.Options config(byte[] value)
Warning: the support of this feature is subject to changes since TensorFlow protos might not be supported on public endpoints in the future.
public EagerSession build()
Copyright © 2022. All rights reserved.