Michael Abbott

Results 222 issues of Michael Abbott
trafficstars

This tries to add some fast paths for the common case, of ordinary arrays of numbers. They look like this: ```julia julia> ProjectTo(rand(3)) # storing .element is now always redundant,...

ProjectTo

An approach to https://github.com/JuliaDiff/ChainRulesCore.jl/issues/411 This lets you specify when it will be safe to apply the in-place rule. `is_inplaceable_destination` is not sufficient, because it must accept Vector{Float64}, but I can't...

speculative
design
inplace accumulation

I think we would generically like StaticArray arguments to have StaticArray tangents. The current behaviour depends on what path you hit: ```julia julia> using StaticArrays, ChainRulesCore julia> p = ProjectTo(SA[1,2,3])...

ProjectTo

``` julia> x = LinearAlgebra.Tridiagonal(rand(4,4)) 4×4 Tridiagonal{Float64, Vector{Float64}}: 0.527801 0.950961 ⋅ ⋅ 0.729178 0.702784 0.941096 ⋅ ⋅ 0.853609 0.652989 0.635001 ⋅ ⋅ 0.37831 0.755058 julia> backing(x) # UndefRefError: access to...

good first issue
Structural Tangent

This ought to return a tuple; what it returns now works in some contexts but not https://github.com/JuliaDiff/ChainRules.jl/pull/644 . ```julia julia> using Diffractor, ChainRulesCore julia> ret = rrule_via_ad(Diffractor.DiffractorRuleConfig(), x -> log(exp(x)),...

At present Diffractor may return thunks, but doesn't seem use them (or anything else) to accumulate effciently: ```julia julia> @btime gradient(x -> sum(x), $(rand(100, 100))) |> first |> typeof min...

This adds many tests from Zygote. I've done some filtering to leave out the most repetitive ones, things which clearly don't apply (like Params), and things testing rules for external...

I'm pretty confident this worked in September, ~~but have no idea whether changes here or in ChainRules broke it:~~ Edit -- the change is https://github.com/JuliaDiff/ChainRulesCore.jl/pull/495, discussed there. ```julia julia> Diffractor.gradient(cbrt,...

```julia julia> gradient(x -> x.re, 2+3im) (Tangent{Complex{Int64}}(re = 1,),) julia> gradient(x -> abs2(x * x.re), 4+5im) ERROR: MethodError: no method matching +(::ComplexF64, ::Tangent{Complex{Int64}, NamedTuple{(:re,), Tuple{Float64}}}) ```

These should agree, right? ```julia julia> Diffractor.PrimeDerivativeBack(x -> real(sin(x)))(1+im) 0.8337300251311491 + 0.9888977057628651im julia> Diffractor.PrimeDerivativeFwd(x -> real(sin(x)))(1+im) ERROR: Tangent space not defined for `Complex{Int64}. ```

forward-mode