Open cpfiffer opened 4 years ago
Isn't it supposed to be Variational.update(q, μ, exp.(ω))
? At least that's what's suggested by Closest candidates are:
Strange, doesn't seem to be yielding good inference:
And I am now getting this:
MethodError: Cannot `convert` an object of type Array{Float64,1} to an object of type SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}
Closest candidates are:
convert(::Type{T}, !Matched::T) where T<:AbstractArray at abstractarray.jl:14
convert(::Type{T}, !Matched::LinearAlgebra.Factorization) where T<:AbstractArray at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/LinearAlgebra/src/factorization.jl:55
convert(::Type{T}, !Matched::Intervals.Interval{T}) where T at /home/cameron/.julia/packages/Intervals/wasuB/src/interval.jl:122
...
Stacktrace:
[1] setproperty!(::Tracker.Tracked{SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}}, ::Symbol, ::Array{Float64,1}) at ./Base.jl:34
[2] back(::Tracker.Tracked{SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}}, ::Array{Float64,1}, ::Bool) at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:53
[3] (::Tracker.var"#13#14"{Bool})(::Tracker.Tracked{SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}}, ::Array{Float64,1}) at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:38
[4] foreach(::Function, ::Tuple{Tracker.Tracked{SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}},Nothing,Nothing}, ::Tuple{Array{Float64,1},Array{Float64,1},Array{Float64,1}}) at ./abstractarray.jl:1920
[5] back_(::Tracker.Call{Tracker.var"#back#550"{3,Base.Broadcast.var"#2#4"{Base.Broadcast.var"#8#10"{Base.Broadcast.var"#1#3",Base.Broadcast.var"#8#10"{Base.Broadcast.var"#5#6"{Base.Broadcast.var"#7#9"},Base.Broadcast.var"#5#6"{Base.Broadcast.var"#5#6"{Base.Broadcast.var"#7#9"}},Base.Broadcast.var"#11#12"{Base.Broadcast.var"#11#12"{Base.Broadcast.var"#13#14"}},Base.Broadcast.var"#15#16"{Base.Broadcast.var"#15#16"{Base.Broadcast.var"#17#18"}},typeof(-)},Base.Broadcast.var"#11#12"{Base.Broadcast.var"#11#12"{Base.Broadcast.var"#13#14"}},Base.Broadcast.var"#15#16"{Base.Broadcast.var"#15#16"{Base.Broadcast.var"#17#18"}},typeof(/)},typeof(abs2)},Tuple{TrackedArray{…,SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}},Array{Float64,1},Array{Float64,1}}},Tuple{Tracker.Tracked{SubArray{Float64,1,Array{Float64,1},Tuple{UnitRange{Int64}},true}},Nothing,Nothing}}, ::Array{Float64,1}, ::Bool) at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:38
[6] back(::Tracker.Tracked{Array{Float64,1}}, ::Array{Float64,1}, ::Bool) at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:58
[7] #13 at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:38 [inlined]
[8] foreach at ./abstractarray.jl:1920 [inlined]
... (the last 4 lines are repeated 97 more times)
[397] back_(::Tracker.Call{Tracker.var"#201#202",Tuple{Tracker.Tracked{Float64}}}, ::Float64, ::Bool) at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:38
[398] back(::Tracker.Tracked{Float64}, ::Float64, ::Bool) at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:58
[399] #back!#15 at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:77 [inlined]
[400] back!(::Tracker.TrackedReal{Float64}, ::Float64) at /home/cameron/.julia/packages/Tracker/cpxco/src/back.jl:75
. . .
Strange, doesn't seem to be yielding good inference:
What parameters are you using? What optimizer? Etc.
And I am now getting this:
This might be something related to https://github.com/TuringLang/Turing.jl/pull/1128
All this is in here: https://github.com/TuringLang/TuringTutorials/blob/master/3_BayesNN.ipynb
No tutorial has been successfully served on the site with the VI code in it. Is it worth fixing or should I just remove it for now?
@torfjelde the BNN tutorial is failing because
doesn't seem to work anymore, because
update
doesn't seem to be exported anymore. I tried callingbut there's a new error:
What's the fix here?