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

Method default_sess

tensorpack/utils/concurrency.py:122–128  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

120
121 @contextmanager
122 def default_sess(self):
123 if self._sess:
124 with self._sess.as_default():
125 yield self._sess
126 else:
127 logger.warn("ShareSessionThread {} wasn't under a default session!".format(self.name))
128 yield None
129
130 def start(self):
131 from ..compat import tfv1

Callers 4

runMethod · 0.80
runMethod · 0.80
runMethod · 0.80
runMethod · 0.80

Calls 1

formatMethod · 0.80

Tested by

no test coverage detected