MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / InferencerToHook

Class InferencerToHook

tensorpack/callbacks/inference_runner.py:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28
29class InferencerToHook(tf.train.SessionRunHook):
30 def __init__(self, inf, fetches):
31 self._inf = inf
32 self._fetches = fetches
33
34 def before_run(self, _):
35 return tf.train.SessionRunArgs(fetches=self._fetches)
36
37 def after_run(self, _, run_values):
38 self._inf.on_fetches(run_values.results)
39
40
41@contextmanager

Callers 2

_build_hookMethod · 0.85
_build_hookMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…