Michael Abbott

Results 1143 comments of Michael Abbott

This looks like #1034. Maybe the rule for `maximum` can just be deleted?

There are slightly more general rules for these in CR, but still restricted to numbers or arrays: https://github.com/JuliaDiff/ChainRules.jl/blob/main/src/rulesets/Base/array.jl#L387 They could be widened to accept anything. Maybe you'd just have to...

Somehow this confuses the implicit parameter handling: you add `x1` to Params, but you access it via a different global variable, `x`, which is not in Params. I guess that's...

Thanks for making an issue. The `nothing` comes from #968, which sends these to `Zygote.forwarddiff(f, x)`, forward over forward, which does not, cannot, track variables closed over in its `f`....

Ok I see. ReverseDiff is dropping down to scalar TrackedReal, which it can trace individually through mutation: ```julia julia> ReverseDiff.gradient([1,2,3.0]) do x y = zeros(@show(eltype(x)), 3) y[1] = x[1] +...

Zygote's `jacobian` function isn't Zygote-differentiable. There was an alternative sketched in https://github.com/FluxML/Zygote.jl/issues/865 which might be. ForwardDiff's `jacobian` also won't directly be Zygote-differentiable. But you can use ForwardDiff twice, something like...

I think what you're seeing is what `Zygote.forwarddiff` warns about, when it says "Note that the function f will drop gradients for any closed-over values". That is, you write `ForwardDiff.jacobian(model,...

This looks similar to https://github.com/FluxML/Zygote.jl/issues/937#issuecomment-849267874, which seems to have fixed itself somehow (on Zygote v0.6.40).

Indeed. This ought to be sped up by #962, and #981. Some times: ``` julia> @btime ForwardDiff.gradient($rosenbrock,$x); 534.750 μs (5 allocations: 111.86 KiB) julia> @btime Tracker.gradient($rosenbrock,$x); 3.340 ms (89931 allocations:...