Skip to content

Differentiating with respect to a function #22

@antoine-levitt

Description

@antoine-levitt

I think this may be covered by #4, but I just want to add this as a use case: differentiating

const A = randn(10,10)
function f(y)
    N = length(y)
    g(x) = sum(abs2, A*x-y)
    x = nlsolve(g, zero(N)) # with appropriate jacobian information, etc
    sum(x.*y)
end
f(randn(10))

The goal would be to define a rule for nlsolve that would compute the derivative of x using the jacobian information and the derivative of g wrt y.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Structural TangentRelated to the `Tangent` type for structured (composite) values

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions