Skip to content

Composite clarification #221

Open
Open
@mzgubic

Description

@mzgubic

The docs say that Composite users should disregard the T parameter as it is an implementation detail.

However both ChainRules and Zygote do not always follow this recommendation.

There is a difference between the two constructors and it is not clear when to apply which one. Perhaps a comment could be added to the docs?

julia> xt = (1, 2)
(1, 2)

julia> ct1 = Composite{Any, typeof(xt)}(xt)
Composite{Any}(1, 2)

julia> ct2 = Composite{Any}(xt)
Composite{Any}((1, 2),)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Structural TangentRelated to the `Tangent` type for structured (composite) valuesdesignRequires some desgin before changes are madedocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions