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

Function _DefineFunction

lingvo/core/py_utils.py:5629–5771  ·  view source on GitHub ↗

Wraps fwd in a defun with custom gradient bak. Args: fwd: A callable xs: Nested Structure -> ys: Nested Structure. fwd_sig: A Nested Structure of tf.TensorSpec representing the input signature of `fwd`, or None (meaning that fwd takes no inputs). bak: A callable xs, ys, dys: Nes

(fwd, fwd_sig, bak=None, bak_as_function=False, device=None)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

__init__Method · 0.85

Calls 8

use_xlaFunction · 0.85
NestedMapClass · 0.85
CallFunction · 0.85
_GetSharedRendezvousFunction · 0.85
TensorSpecsFunction · 0.85
_WrapFunctionFunction · 0.85
FlattenFunction · 0.85
ForwardWithGradFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…