Open mzgubic opened 4 years ago
The docs say that Composite users should disregard the T parameter as it is an implementation detail.
Composite
T
However both ChainRules and Zygote do not always follow this recommendation.
ChainRules
Zygote
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),)
As a consequence they behave differently when splatted:
julia> println(ct1...) 12 julia> println(ct2...) (1, 2)
Xref #198
The docs say that
Composite
users should disregard theT
parameter as it is an implementation detail.However both
ChainRules
andZygote
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?