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

Method _capture_helper

tensorflow/python/framework/func_graph.py:608–618  ·  view source on GitHub ↗
(self, tensor, name)

Source from the content-addressed store, hash-verified

606 return tensor
607
608 def _capture_helper(self, tensor, name):
609 capture = self._captures.get(ops.tensor_id(tensor))
610 if capture is None:
611 placeholder = _create_substitute_placeholder(
612 tensor, name=name, dtype=tensor.dtype)
613 self.add_capture(tensor, placeholder)
614 else:
615 placeholder = capture[1]
616 tape.record_operation("captured_value", [placeholder], [tensor],
617 lambda x: [x])
618 return placeholder
619
620 @property
621 def captures(self):

Callers 1

captureMethod · 0.95

Calls 4

add_captureMethod · 0.95
getMethod · 0.45
tensor_idMethod · 0.45

Tested by

no test coverage detected