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

Function exit

tensorflow/python/ops/control_flow_ops.py:262–283  ·  view source on GitHub ↗

Exits the current frame to its parent frame. Exit makes its input `data` available to the parent frame. Args: data: The tensor to be made available to the parent frame. name: A name for this operation (optional). Returns: The same tensor as `data`.

(data, name=None)

Source from the content-addressed store, hash-verified

260
261
262def exit(data, name=None): # pylint: disable=redefined-builtin
263 """Exits the current frame to its parent frame.
264
265 Exit makes its input `data` available to the parent frame.
266
267 Args:
268 data: The tensor to be made available to the parent frame.
269 name: A name for this operation (optional).
270
271 Returns:
272 The same tensor as `data`.
273 """
274 data = ops.internal_convert_to_tensor_or_composite(data, as_ref=True)
275 if isinstance(data, ops.Tensor):
276 if data.dtype._is_ref_dtype: # pylint: disable=protected-access
277 return gen_control_flow_ops.ref_exit(data, name)
278 else:
279 return gen_control_flow_ops._exit(data, name)
280 elif isinstance(data, composite_tensor.CompositeTensor):
281 return nest.map_structure(exit, data, expand_composites=True)
282 else:
283 raise TypeError("Type %s not supported" % type(data))
284
285
286def switch(data, pred, dtype=None, name=None):

Callers 15

launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85
launch.pyFile · 0.85

Calls 1

typeFunction · 0.85

Tested by 4

ParseTestFlagsFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
RunMethod · 0.68