ZeroTangent definition

At first glance it seems this one should actually be NoTangent(), but the NO_FIELDS renaming is a good clue. The pullback takes an output perturbation and “pulls it back” into an input perturbation. But the input includes the function gf_pf itself: it might be that this function has internal fields involved in differentiation (for instance if it is a closure or a callable struct). Here, the first element returned by U_pullback tells us that the derivative of the function output with respect to the function object itself is zero (or undefined with NoTangent).

1 Like