Skip to content

rand_tangent(adjoint(array)) returns Composite even though Adjoint is a natural differential #151

@mzgubic

Description

@mzgubic

Presently

julia> A = rand(3, 3);

julia> adj = adjoint(A);

julia> ChainRulesTestUtils.rand_tangent(adj)
Composite{Adjoint{Float64,Array{Float64,2}}}(parent = [-0.5319309079526605 -1.2397774126992458 1.450107932767501; 0.2443697244819896 -0.5283784206385908 -0.36484818100635125; -0.18829408436246423 -1.0652797084400936 -1.0457119567770545],)

whereas we would like to get an Adjoint out, which is a natural differential type.

Probably just need to define a new dispatch for rand_tangent?

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