-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ProjectTo called on tuples #440
Comments
I wonder how far we can go with
So not generally supporting projecting natural tangent types (like The thing that goes with this is that all types that don't have This may or may not be a wise idea. I probably have argued against it in the past 😁) Safer is probably one specifically for tuples. |
The narrow bug is here: https://github.com/JuliaDiff/ChainRules.jl/blob/master/src/rulesets/Base/mapreduce.jl#L67 This rule accepts an array of tuples, but can't actually handle them. We may want to extend projection to other types... possibly recursing into arbitrary types... Ref is the one we're already committed to supporting, for which #427 is trying to sort out what to do. |
Closed by #488 |
Well, maybe not!
But the remaining issue should be solved by FluxML/Zygote.jl#1103. With that:
|
* wrap_chainrules_input for arrays of Ref * z2d too, for rrule_via_ad * test from JuliaDiff/ChainRulesCore.jl#440 * add test from JuliaDiff/ChainRules.jl#537 * more tests related to CRC types * union nothing, fix one case * comments
When using tuples in the function
g
(instead of a vector in functionf
) in the example belowI am getting the following error
The text was updated successfully, but these errors were encountered: