You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Repeted evaluation of fx0 when computing forward differences for gradients #202
For f that maps a vector of length N to a scalar, I am expecting f to be evaluated for only N+1 times with fdtype == Val(:forward). What actually happens is that the same fx0 = f(x) is evaluated for N times as iterating across all elements of the input vector. Hence, f is called 2N times!
See the line below that should be pulled out of the loop:
Activity
Fix repeated evaluation of fx0 in forward gradient computation