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

Function _inference_context

tensorpack/callbacks/inference_runner.py:42–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41@contextmanager
42def _inference_context():
43 msg = "You might need to check your input implementation."
44 try:
45 yield
46 except (StopIteration, tf.errors.CancelledError):
47 logger.error(
48 "[InferenceRunner] input stopped before reaching its __len__()! " + msg)
49 raise
50 except tf.errors.OutOfRangeError: # tf.data reaches an end
51 pass
52
53
54class InferenceRunnerBase(Callback):

Callers 2

_triggerMethod · 0.85
_triggerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected