Skip to content

Early stopping #18

Closed
Closed
@oxinabox

Description

@oxinabox

Consider a function foo(x) = f(g(h(x))) that we might want to take the derivative of.
If in this function the deriviative of g is zero, either in dynamic iszero sense,
or in the ChainRules stong Zero sense.
then we should not calculate the derivative of f.
We should just run f like a normal function.
since the pushforward is always linear,
so the deriviative of foo is going to be zero.

More generally for multiargument functions, need to check all arguments.

This can potentially give signficiant speedup,
since the basic implementation of f could be much simpler or at least more cache friendly.

This discussion comes out of:
JuliaDiff/ChainRulesCore.jl#90

Might take some redesign to make this work out.
but could be quite worth-wild.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions