View source on GitHub
|
The global config of model modes.
TrainableWrapper.read_value is not thread-safe that causes threads
competition and Out-Of-Bound exception in concurrent serving scenario.
To resolve this, we define the ModelMode APIs to instruct
the TrainableWrapper to build a different thread-safe sub-graph
for 'TrainableWrapper.read_value' on inference mode.
NOTE These APIs should be called before any graph are built.
The following standard modes are defined:
TRAIN: training/fitting mode.INFERENCE: prediction/inference mode.
View source on GitHub