Skip to content

apply_transform_strategy returns wrong logjac for DynamicLink → FixedTransform #1407

Description

@yebai

In src/transformed_values.jl, the apply_transform_strategy method for a TransformedValue{...,DynamicLink} input with a FixedTransform target returns

(raw_value, transformed_tv, logjac - inv_logjac)

but the documented contract (src/transformed_values.jl:318-321 and the AbstractTransformStrategy docstring) requires the returned logjac to be only the forward Jacobian of the target transform evaluated at raw_value. The inv_logjac term is internal bookkeeping for undoing the input DynamicLink and should not leak into the accumulator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions