Michael Abbott

Results 1316 comments of Michael Abbott

> By "never escapes", I mean that a pullback always returns a Tangent You mean _every_ pullback always returns a Tangent, I think. (Or maybe not for `Complex`.) I'm going...

> How is it that an AbstractArray tangent comes into existence in the first place if not via conversion from a structural The generic rule for `sum(x)` would be something...

This is a lot of text. I think that all examples with Fill are solved by ``` (project::ProjectTo{Fill})(dx::Tangent) = Fill(dx.value / prod(length, project.axes), project.axes) ``` matching what already happens for...

For problem (2), I'm not sure that calling to_structural on the mismatched natural is always going to work. We allow (some) subspaces which aren't subtypes. If you want to add...

> What should ProjectTo do Right now it explicitly allows this, but I'm not sure much is gained: https://github.com/JuliaDiff/ChainRulesCore.jl/blob/master/src/projection.jl#L330-L337 Without that, you'd get `UpperTriangular(Diagonal(...))`. A sketch of a larger machine...

> are sufficient. To my mind it is enough that someone could do this, [...] don't believe there's a need to go hunting in the wild. Re (1), I'm dubious...

TIL. Could or should more of these be made to work? ``` julia> d = Diagonal([1,2,3]); julia> t = Tangent{typeof(d)}(diag=[4,5,6]); julia> d + t 3×3 Diagonal{Int64, Vector{Int64}}: 5 ⋅ ⋅...

To explore these things, I made some examples here: https://github.com/mcabbott/OddArrays.jl In particular, this has examples of the sort we didn't have above. For `r = Rotation(θ)` there is a method...

Dispatch is tricky... it would be possible to add more methods here to catch this: https://github.com/mcabbott/AxisKeys.jl/blob/master/src/functions.jl#L287-L303 I wish there was a better approach though. For scalars, Base has clever `promote_rule`...

Maybe we should add a few more cases if they are useful? I think the long-term solution is (1) to upgrade LinearAlgebra to work with OffsetArrays, by propagating axes(A) not...