Skip to content

Fall back on AD? #10

Open
Open
@cscherrer

Description

@cscherrer

This bit me today:

julia> with_logabsdet_jacobian(cbrt, 2.0)
NoLogAbsDetJacobian{typeof(cbrt), Float64}()

I could add a method for this, but there are so many other functions out there, maybe this could be automated?

This seems possible, since it's invertible:

julia> inverse(cbrt)
(::Base.Fix2{typeof(^), Int64}) (generic function with 1 method)

and AD-friendly:

julia> ForwardDiff.derivative(cbrt, 2.0)
0.2099868416491455

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions