This may be a more general question about what hooks are.
Hooks are called accordingly in the sense that they allow a way to “connect” to specific points in the execution of a program. Thus, you can run the function or perform registration after executing a certain part of the code.
, SessionRunHook, , . "" .
SessionRunHooks , ,
. SessionRunHooks
:
session.run()session.run()
SessionRunHook / ,
MonitoredSession.run().
ops-or-tensor/feeds ,
. ops
hook.begin(). begin().
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/training/session_run_hook.py