MCPcopy Create free account
hub / github.com/alibaba/nann / _SwitchGrad

Function _SwitchGrad

tensorflow/tensorflow/python/ops/control_flow_grad.py:35–88  ·  view source on GitHub ↗

Gradients for a Switch op is calculated using a Merge op. If the switch is a loop switch, it will be visited twice. We create the merge on the first visit, and update the other input of the merge on the second visit. A next_iteration is also added on second visit.

(op, *grad)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

mergeFunction · 0.70
switchFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected