View source on GitHub
|
Session-like object that handles initialization, recovery and hooks.
tf.compat.v1.train.MonitoredSession(
session_creator=None, hooks=None, stop_grace_period_secs=120
)
Migrate to TF2
This API is not compatible with eager execution and tf.function. To migrate
to TF2, rewrite the code to be compatible with eager execution. Check the
migration
guide
on replacing Session.run calls. In Keras, session hooks can be replaced by
Callbacks e.g. logging hook notebook
For more details please read Better
performance with tf.function.
View source on GitHub