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

Function _get_handle_deleter

tensorflow/python/ops/session_ops.py:292–303  ·  view source on GitHub ↗

Return a deletion subgraph for this handle.

(graph, deleter_key, handle)

Source from the content-addressed store, hash-verified

290
291
292def _get_handle_deleter(graph, deleter_key, handle):
293 """Return a deletion subgraph for this handle."""
294 result = graph._handle_deleters.get(deleter_key)
295 if result is None:
296 # Create deleter if we haven't done it.
297 handle_device = TensorHandle._get_device_name(handle)
298 with graph.as_default(), graph.device(handle_device):
299 holder = array_ops.placeholder(dtypes.string)
300 deleter = gen_data_flow_ops.delete_session_tensor(holder)
301 result = (holder, deleter)
302 graph._handle_deleters[deleter_key] = result
303 return result

Callers 1

deleteMethod · 0.85

Calls 5

_get_device_nameMethod · 0.80
getMethod · 0.45
as_defaultMethod · 0.45
deviceMethod · 0.45
placeholderMethod · 0.45

Tested by

no test coverage detected