MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _CapturedObject

Class _CapturedObject

tensorflow/contrib/compiler/xla.py:33–48  ·  view source on GitHub ↗

A placeholder to capture an object.

Source from the content-addressed store, hash-verified

31check_function_argument_count = xla.check_function_argument_count
32
33class _CapturedObject(object):
34 """A placeholder to capture an object."""
35
36 def __init__(self):
37 self._object = None
38
39 def capture(self, o):
40 if self._object:
41 raise RuntimeError(
42 'InternalError: _CapturedObject can capture only once. Please file '
43 'bug.')
44
45 self._object = o
46
47 def get(self):
48 return self._object
49
50
51def _get_scaffold(captured_scaffold_fn):

Callers 2

_make_train_stepMethod · 0.70
_make_eval_stepMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected