-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
ProjectTorelated to the projection functionalityrelated to the projection functionality
Description
Right now we have
julia> ProjectTo([1.0, 2.0])([NoTangent(), NoTangent()])
2-element Vector{NoTangent}:
NoTangent()
NoTangent()I propose we want:
julia> ProjectTo([1.0, 2.0])([NoTangent(), NoTangent()])
NoTangent()They are semantically the same: they are bot hrepresetnations of a nondifferentiable zero.
But NoTangent is nicer.
I think this would be helpful for several cases,
and I think it would be nicely symmetric with ProjectTo(Array{Bool})=ProjectTo{NoTangent}()
Cases it would help with is things like higher order function such as map and sum etc
I think often you can avoid it outright by not even computing the element for the function object, but sometimes it comes up for hte args.
E.g. map(getindex, xs, inds) it would still benefit since it would compress those inds
It came up in ChainRulesTestUtils
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ProjectTorelated to the projection functionalityrelated to the projection functionality