Carlo Lucibello
Carlo Lucibello
This has emerged in https://github.com/FluxML/Flux.jl/issues/1128 ```julia julia> using Zygote, CuArrays julia> gradient(x -> sum(x .< 1), rand(2)) (nothing,) julia> gradient(x -> sum(x .< 1), rand(2) |> cu) ERROR: MethodError: no...
The last example, behaves differently from the first two ```julia julia> gradient(w -> sum(w), [1,1]) # ok, gradient is array ([1, 1],) julia> gradient(w -> sum([w[1], w[2]]), [1,1]) # ok,...
...to the respective repos, using ChainRulesCore. This is a list of non-Base functions currently having adjoints in Zygote: - [ ] Distances - [ ] StatsFuns - [ ] SpecialFunctions...
I was trying to figure out how to properly handle and update Flux's layers with tied weights ( https://github.com/FluxML/Flux.jl/issues/1592). So first of all I wanted to check how Zygote handles...
we should replace out testing utilities https://github.com/FluxML/Zygote.jl/blob/master/test/gradcheck.jl with the ones given by ChainRulesTestUtils. https://juliadiff.org/ChainRulesTestUtils.jl/dev/#Testing-AD-systems
In Flux, we typically apply `@functor` to a type for 2 purposes: 1. for recursively traversing structs and mapping leaves, as done by `gpu` 2. collecting parameters in a `Zygote.Params`...
Zygote is missing some `repeat` adjoints; ```julia # this is OK julia> gradient(x -> sum(repeat(x, outer=(2,2,2))), reshape(1:8, 2,2,2)) ([8 8; 8 8] [8 8; 8 8],) # missing rule julia>...
```julia julia> x = (; a=1, b=2) (a = 1, b = 2) julia> map(sqrt, x) (a = 1.0, b = 1.4142135623730951) julia> gradient(x -> map(sqrt, x).a, x) ERROR: MethodError:...
When executing a cell like this ```julia for i in 1:5 println("hi!") sleep(1) end ``` each print is not flushed immediately but the output is displayed only at the end...
Having the Manifest checked in prevents CI from testing on an up-to-date ecosystem