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

Function delete_session_tensor

tensorflow/python/ops/session_ops.py:224–244  ·  view source on GitHub ↗

Delete the tensor for the given tensor handle. This is EXPERIMENTAL and subject to change. Delete the tensor of a given tensor handle. The tensor is produced in a previous run() and stored in the state of the session. Args: handle: The string representation of a persistent tensor hand

(handle, name=None)

Source from the content-addressed store, hash-verified

222
223@tf_export(v1=["delete_session_tensor"])
224def delete_session_tensor(handle, name=None):
225 """Delete the tensor for the given tensor handle.
226
227 This is EXPERIMENTAL and subject to change.
228
229 Delete the tensor of a given tensor handle. The tensor is produced
230 in a previous run() and stored in the state of the session.
231
232 Args:
233 handle: The string representation of a persistent tensor handle.
234 name: Optional name prefix for the return tensor.
235
236 Returns:
237 A pair of graph elements. The first is a placeholder for feeding a
238 tensor handle and the second is a deletion operation.
239 """
240 handle_device = TensorHandle._get_device_name(handle)
241 with ops.device(handle_device):
242 holder = array_ops.placeholder(dtypes.string)
243 deleter = gen_data_flow_ops.delete_session_tensor(holder, name=name)
244 return (holder, deleter)
245
246
247def _register_handle_feeder(graph, feeder, dtype):

Callers

nothing calls this directly

Calls 3

_get_device_nameMethod · 0.80
deviceMethod · 0.45
placeholderMethod · 0.45

Tested by

no test coverage detected