MCPcopy Index your code
hub / github.com/pytorch/pytorch / SwitchNot

Function SwitchNot

caffe2/python/control.py:515–523  ·  view source on GitHub ↗

Similar to Switch() but execute the steps for which the condition is False.

(name, *conditions)

Source from the content-addressed store, hash-verified

513
514
515def SwitchNot(name, *conditions):
516 """
517 Similar to Switch() but execute the steps for which the condition is False.
518 """
519 conditions = _MakeList(conditions)
520 return core.scoped_execution_step(
521 _get_next_step_name('SwitchNot', name),
522 [_RunOnceIfNot(name + '/SwitchNot', cond, step)
523 for cond, step in conditions])
524
525
526def If(name, condition_blob_or_net,

Callers

nothing calls this directly

Calls 3

_MakeListFunction · 0.85
_get_next_step_nameFunction · 0.85
_RunOnceIfNotFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…