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

Function get_output_slot

tensorflow/python/debug/lib/debug_graphs.py:54–67  ·  view source on GitHub ↗

Get the output slot number from the name of a graph element. If element_name is a node name without output slot at the end, 0 will be assumed. Args: element_name: (`str`) name of the graph element in question. Returns: (`int`) output slot number.

(element_name)

Source from the content-addressed store, hash-verified

52
53
54def get_output_slot(element_name):
55 """Get the output slot number from the name of a graph element.
56
57 If element_name is a node name without output slot at the end, 0 will be
58 assumed.
59
60 Args:
61 element_name: (`str`) name of the graph element in question.
62
63 Returns:
64 (`int`) output slot number.
65 """
66 _, output_slot = parse_node_or_tensor_name(element_name)
67 return output_slot if output_slot is not None else 0
68
69
70def is_copy_node(node_name):

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected