MCPcopy Create free account
hub / github.com/tensorflow/lingvo / If

Function If

lingvo/core/py_utils.py:6064–6095  ·  view source on GitHub ↗

Helper to construct an if/else statement. Args: cond: A scalar `Tensor` that can be converted to boolean. inputs: A flattenable representing the input tensors of the if/else statement. Can be None to represent no inputs. then_branch: A callable 'inputs' -> flattenable. The retur

(cond, inputs, then_branch, else_branch)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 6

TensorSpecsFunction · 0.85
FunctionClass · 0.85
IsCompatibleFunction · 0.85
FlattenFunction · 0.85
PackFunction · 0.85
AddFrameworkInputsMethod · 0.80

Tested by

no test coverage detected