What does the hook used in tensor flow mean?

I could not understand the exact meaning of the hook in python, tensorflow

_LearningRateSetterHook(tf.train.SessionRun**Hook**):

I would be grateful if you explain this to me. Thanks you

+11
source share
1 answer

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

+15

Source: https://habr.com/ru/post/1685379/


All Articles