Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ForwardDiff conditional dependence #87

Open
mschauer opened this issue Jun 23, 2021 · 0 comments
Open

Make ForwardDiff conditional dependence #87

mschauer opened this issue Jun 23, 2021 · 0 comments

Comments

@mschauer
Copy link
Owner

Also give "definite" version of derivative helper functions such as

function negpartiali(f, d)
    id = collect(I(d))
    ith = [id[:,i] for i in 1:d]
    function (x, i, args...)
        sa = StructArray{Dual{}}((x, ith[i]))
        δ = -f(sa, args...).partials[]
        return δ
    end
end

avoiding perturbation confusion and https://discourse.julialang.org/t/gradient-and-directional-second-derivative-with-forwarddiff/63429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant