-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
Structural TangentRelated to the `Tangent` type for structured (composite) valuesRelated to the `Tangent` type for structured (composite) valuesbugSomething isn't workingSomething isn't working
Description
The current definition places no restrictions on the backing type T
ChainRulesCore.jl/src/tangent_types/tangent.jl
Lines 24 to 28 in bde3166
| struct Tangent{P,T} <: AbstractTangent | |
| # Note: If T is a Tuple/Dict, then P is also a Tuple/Dict | |
| # (but potentially a different one, as it doesn't contain differentials) | |
| backing::T | |
| end |
which means it can be something unexpected like an array, which caused relatively hard-to-diagnose issues here:
FluxML/Zygote.jl#1107 (comment)
Do we want to restrict T to be a NamedTuple/Tuple/Dict?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Structural TangentRelated to the `Tangent` type for structured (composite) valuesRelated to the `Tangent` type for structured (composite) valuesbugSomething isn't workingSomething isn't working