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

Method _initialize_session

tensorpack/predict/feedfree.py:57–65  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

55 self._hooks.append(hook)
56
57 def _initialize_session(self):
58 # init the session
59 self._config.session_init._setup_graph()
60 self._sess = self._config.session_creator.create_session()
61 self._config.session_init._run_init(self._sess)
62
63 with self._sess.as_default():
64 self._input_callbacks.before_train()
65 self._hooked_sess = HookedSession(self._sess, self._hooks)
66
67 def __call__(self):
68 return self._hooked_sess.run(self._output_tensors)

Callers 1

__init__Method · 0.95

Calls 4

before_trainMethod · 0.80
_setup_graphMethod · 0.45
create_sessionMethod · 0.45
_run_initMethod · 0.45

Tested by

no test coverage detected