Michael Abbott

Results 1143 comments of Michael Abbott

This now seems to work, maybe should become a test: ``` julia> x = (; a=1, b=2) (a = 1, b = 2) julia> map(sqrt, x) (a = 1.0, b...

Zygote's jacobian function isn't Zygote-differentiable. There's no major barrier to making it so, someone just has to do it. I think the most relevant issue for this is https://github.com/FluxML/Zygote.jl/issues/953 ....

Zygote does not know this, unfortunately. It works backwards from the final result, in complete ignorance of which branches of the expression tree ultimately lead to gradients you do or...

> no adjoint for Zygote.jacobian. Quite misleading The reason for this is that looking inside unknown functions is literally what it does for a living. It doesn't stop at the...

Oh I know. My only advice is to start small and add things... I've marked the jacobian posts "duplicate" since these are exactly #1268 now.

There are two hessian functions, and they are very short: https://github.com/FluxML/Zygote.jl/blob/7f2b16987dc4eab236aabd889444cabdcc6f9caf/src/lib/grad.jl#L74-L89 The all-zygote one would in principal be differentiable, if #1268 were solved. ``` julia> function f3(x, ps) hess =...

Even `a = identity(x)` is enough to stop this. It seems to sometimes get confused that assignment does not permanently identify variables. Similar to #1236 and https://github.com/FluxML/Zygote.jl/issues/1198 perhaps.

It is not. Could you please try to simplify before asking for help? This appears to give the same error: ``` julia> using Zygote julia> function loss2() summ = 0....

One slightly crude way to solve this is to ensure that `iterate` on the range calls `getindex` which has a rule: ``` import ChainRulesCore: rrule, HasReverseMode, RuleConfig function rrule(config::RuleConfig{>:HasReverseMode}, ::typeof(Base.unsafe_getindex),...

The example above should now just work, on Zygote#master. However, this deserves a link: https://github.com/FluxML/Zygote.jl/issues/953#issuecomment-841882071: Implicit parameters inside the function you pass to `ForwardDiff.xxx` will be ignored. I think that's...