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

Method clear_captures

tensorflow/python/framework/func_graph.py:649–657  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

647 return capture[1]
648
649 def clear_captures(self):
650 # TODO(b/115366440): Delete this method when a custom OrderedDict is added.
651 # Clearing captures using clear() leaves some cycles around.
652 while self._captures:
653 self._captures.popitem()
654 memory.dismantle_ordered_dict(self._captures)
655 while self._deferred_captures:
656 self._deferred_captures.popitem()
657 memory.dismantle_ordered_dict(self._deferred_captures)
658
659 def capture_distributed_variable(self, variable, placeholder):
660 """Add given distributed variable to captures with given placeholder."""

Callers 1

dismantle_func_graphFunction · 0.80

Calls 1

popitemMethod · 0.45

Tested by

no test coverage detected