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

Function IsLoopSwitch

tensorflow/python/ops/control_flow_util.py:150–155  ·  view source on GitHub ↗

Return true if `op` is the Switch for a while loop.

(op)

Source from the content-addressed store, hash-verified

148
149
150def IsLoopSwitch(op):
151 """Return true if `op` is the Switch for a while loop."""
152 if IsSwitch(op):
153 ctxt = op._get_control_flow_context() # pylint: disable=protected-access
154 return ctxt is not None and ctxt.IsWhileContext() and not IsCondSwitch(op)
155 return False
156
157
158def IsLoopMerge(op):

Callers

nothing calls this directly

Calls 4

IsCondSwitchFunction · 0.85
IsSwitchFunction · 0.70
IsWhileContextMethod · 0.45

Tested by

no test coverage detected