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

Method _build_hook

tensorpack/callbacks/inference_runner.py:134–137  ·  view source on GitHub ↗
(self, inf)

Source from the content-addressed store, hash-verified

132 super(InferenceRunner, self).__init__(input, infs)
133
134 def _build_hook(self, inf):
135 out_names = inf.get_fetches()
136 fetches = self._tower_handle.get_tensors(out_names)
137 return InferencerToHook(inf, fetches)
138
139 def _setup_graph(self):
140 if self._tower_func is None:

Callers 1

_setup_graphMethod · 0.95

Calls 3

InferencerToHookClass · 0.85
get_fetchesMethod · 0.80
get_tensorsMethod · 0.80

Tested by

no test coverage detected