-
```julia
julia> using Zygote
julia> function f(x)
d = Dict(1=>x)
d2 = copy(d)
return d2[1]
end
f (generic function with 1 method)
julia> gradient(f, 1)
…
-
### Package Version
Zygote v0.6.49, ModelingToolkit v8.29.1
### Julia Version
Julia Version 1.8.2
### OS / Environment
macOS Monterey 12.6
### Describe the bug
Recently, my scripts I was using …
-
> I did implement the things mentioned above but when applied to a toy workflow inspired from the doc, it is currently not working. I am unclear on what the error message means. The cause could be wha…
-
v1 is the standard basis vector
```
julia> Zygote.gradient(v->0v, v1)
ERROR: cannot convert from ⟨×××⟩ to ⟨+++---⟩*
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] (::SubMan…
-
As several layers support complex types (e.g., Dense, Conv, Bilinear), I expected the same from MeanPool and AdaptiveMeanPool. Example below for MeanPool (copied and pasted from jupyterlab). I've e…
-
I guess half-precision is not officially supported by Flux yet, but as it "almost" works now, perhaps it is worth looking into:
```julia
julia> cc = Flux.paramtype(Float16, Conv((3,3), 3 => 64)) |…
-
```julia
julia> function train()
@showprogress for d in 1:10
gs = Zygote.gradient(1.0) do x
return sin(x)
end
end
end
train (generic function with 1 m…
-
```julia
julia> gradient(x -> evalpoly(x, (1,2,3.5)), 2.0)
(16.0,)
julia> gradient(x -> evalpoly(x, [1,2,3.5]), 2.0)
(16.0,)
julia> gradient(x -> sum(evalpoly.(x, Ref((1,2,3.5)))), [2.0])
([…
-
Zygote doesn't interact too nicely with LazyArrays.jl it seems, e.g.:
```julia
julia> f(x) = sum(BroadcastArray(exp, x))
f (generic function with 1 method)
julia> Zygote.gradient(f, randn(10))
…
-
MWE
```julia
julia> using Zygote
julia> function f(x)
@info x
2 * x
end
f (generic function with 1 method)
julia> f'(1.0)
[ Info: 1.0
ERROR: Compiling Tuple{typeof…