brainstorm/training/trainer.py
def _emit_hooks(self, net, timescale, logs=None):
        """Call the hooks which should be called at this timescale."""
        should_stop = False
        count = self.current_epoch_nr if timescale == 'epoch' else \
            self.current_update_nr

        for name, hook in self.hooks.items():
            if hook.timescale != timescale or count % hook.interval != 0:
                continue

            hook_log, stop = self._call_hook(hook, net)
            should_stop |= stop
            self._add_log(name, hook_log, hook.verbose, logs=logs)

        return should_stop
Call the hooks which should be called at this timescale.
Call the hooks which should be called at this timescale.
Call the hooks which should be called at this timescale .
def _emit_hooks(self, net, timescale, logs=None):
        should_stop = False
        count = self.current_epoch_nr if timescale == 'epoch' else \
            self.current_update_nr
        for name, hook in self.hooks.items():
            if hook.timescale != timescale or count % hook.interval != 0:
                continue
            hook_log, stop = self._call_hook(hook, net)
            should_stop |= stop
            self._add_log(name, hook_log, hook.verbose, logs=logs)
        return should_stop
def _emit_hooks ( self , net , timescale , logs = None ) : should_stop = False count = self . current_epoch_nr if timescale == 'epoch' else self . current_update_nr for name , hook in self . hooks . items ( ) : if hook . timescale != timescale or count % hook . interval != 0 : continue hook_log , stop = self . _call_hook ( hook , net ) should_stop |= stop self . _add_log ( name , hook_log , hook . verbose , logs = logs ) return should_stop
Call the hooks which should be called at this timescale.
Call the hooks which should be called at this timescale .
"""Call the hooks which should be called at this timescale."""
self
net
timescale
logs