Skip to content

Checking for availability of ladj #6

Closed
@oschulz

Description

@oschulz

I have a use case that hat needs to determine if a function supports with_logabsdet_jacobian in a type-stable fashion (try/catch won't do), so that fallback code (logabsdet(ForwardDiff.hessian(...)) in my case) can be run if not. I think such functionality would be useful in general.

We could do this via a has_logabsdet_jacobian function or via a default definition with_logabsdet_jacobian(f, x) = nothing (like the default of ChainRulesCore.rrule).

This is related to JuliaMath/InverseFunctions.jl#13.

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