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

Function GetLoopConstantEnter

tensorflow/python/ops/control_flow_util.py:171–177  ·  view source on GitHub ↗

Return the enter op if we can infer `value` to be a loop invariant.

(value)

Source from the content-addressed store, hash-verified

169
170
171def GetLoopConstantEnter(value):
172 """Return the enter op if we can infer `value` to be a loop invariant."""
173 id_ops = {"Switch", "RefSwitch", "Identity", "RefIdentity"}
174 op = value.op
175 while op.type in id_ops:
176 op = op.inputs[0].op
177 return op if IsLoopConstantEnter(op) else None
178
179
180def GetOutputContext(op):

Callers

nothing calls this directly

Calls 1

IsLoopConstantEnterFunction · 0.85

Tested by

no test coverage detected