You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working with Julia v1.6.7 and trying to execute this code:
W = rand(2, 5)
b = rand(2)
linear(x) = W * x .+ b
grads = gradient(() -> sum(linear(x)), Params([W, b]))
but I receive the error:
MethodError: no method matching back!(::Float64)
Closest candidates are:
back!(::Any, ::Any; once) at C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:74
back!(::Tracker.TrackedReal; once) at C:\Users\choud.julia\packages\Tracker\tdXqL\src\lib\real.jl:15
back!(::Tracker.TrackedArray) at C:\Users\choud.julia\packages\Tracker\tdXqL\src\lib\array.jl:68
Stacktrace:
[1] gradient_(f::var"#96#97", xs::Tracker.Params)
@ Tracker C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:4
[2] gradient_(f::Function, ps::Params{Zygote.Buffer{Array{Float64, N} where N, Vector{Array{Float64, N} where N}}})
@ Zygote.ZygoteTrackerExt C:\Users\choud.julia\packages\Zygote\4SSHS\ext\ZygoteTrackerExt.jl:15
[3] #gradient#689
@ C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:164 [inlined]
[4] gradient(f::Function, xs::Params{Zygote.Buffer{Array{Float64, N} where N, Vector{Array{Float64, N} where N}}})
@ Tracker C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:164
[5] top-level scope
@ In[80]:4
Does this have to do anything with the version of my Julia
The text was updated successfully, but these errors were encountered:
Can you please provide a full Minimal Working Example (MWE) which has all required code to run? Currently this one lacks any package imports, and I can't even tell if you're using Zygote!
I am working with Julia v1.6.7 and trying to execute this code:
W = rand(2, 5)
b = rand(2)
linear(x) = W * x .+ b
grads = gradient(() -> sum(linear(x)), Params([W, b]))
but I receive the error:
MethodError: no method matching back!(::Float64)
Closest candidates are:
back!(::Any, ::Any; once) at C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:74
back!(::Tracker.TrackedReal; once) at C:\Users\choud.julia\packages\Tracker\tdXqL\src\lib\real.jl:15
back!(::Tracker.TrackedArray) at C:\Users\choud.julia\packages\Tracker\tdXqL\src\lib\array.jl:68
Stacktrace:
[1] gradient_(f::var"#96#97", xs::Tracker.Params)
@ Tracker C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:4
[2] gradient_(f::Function, ps::Params{Zygote.Buffer{Array{Float64, N} where N, Vector{Array{Float64, N} where N}}})
@ Zygote.ZygoteTrackerExt C:\Users\choud.julia\packages\Zygote\4SSHS\ext\ZygoteTrackerExt.jl:15
[3] #gradient#689
@ C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:164 [inlined]
[4] gradient(f::Function, xs::Params{Zygote.Buffer{Array{Float64, N} where N, Vector{Array{Float64, N} where N}}})
@ Tracker C:\Users\choud.julia\packages\Tracker\tdXqL\src\back.jl:164
[5] top-level scope
@ In[80]:4
Does this have to do anything with the version of my Julia
The text was updated successfully, but these errors were encountered: