main_loop_tf
main_loop_tf copied to clipboard
Swap sess and unhookedsess
People tend to use self.sess in validation, which causes the hooks to be run. When the validation hook is among the hooks this causes an infinite loop.
It's probably better to change self.sess to become self.sess_with_hooks and make self.unhookedsess become self.sess. Will work on it as soon as I can, but happy to accept PRs.