invalid index: 19.0
On julia 0.5
using PlotRecipes
code = :(function transform!{T}(act::Activation{:softmax,T})
val = forward!(act.input)
out = act.output.val
for i=1:act.n
out[i] = exp(val[i])
end
s = one(T) / sum(out)
for i=1:act.n
out[i] *= s
end
out
end)
plot(code, fontsize=11, shorten=0.2, axis_buffer=0.05)
get
ArgumentError: invalid index: 19.0
in getindex(::Array{Float64,1}, ::Float64) at array.jl:386
in apportion(::Int64, ::Int64, ::NetworkLayout.Buchheim.Tree{Array{Array{Int64,1},1},Array{FixedSizeArrays.Point{2,Float64},1},Array{Float64,1}}) at buchheim.jl:128
in first_walk(::Int64, ::NetworkLayout.Buchheim.Tree{Array{Array{Int64,1},1},Array{FixedSizeArrays.Point{2,Float64},1},Array{Float64,1}}) at buchheim.jl:86
in first_walk(::Int64, ::NetworkLayout.Buchheim.Tree{Array{Array{Int64,1},1},Array{FixedSizeArrays.Point{2,Float64},1},Array{Float64,1}}) at buchheim.jl:85
in layout! at buchheim.jl:49 [inlined]
in #layout#3 at buchheim.jl:44 [inlined]
in (::NetworkLayout.Buchheim.#kw##layout)(::Array{Any,1}, ::NetworkLayout.Buchheim.#layout, ::Array{Array{Int64,1},1}) at <missing>:0
in #buchheim_graph#8(::Array{Float64,1}, ::Symbol, ::Float64, ::Void, ::Int64, ::Array{Any,1}, ::Function, ::Array{Array{Int64,1},1}) at graph_layouts.jl:151
in (::PlotRecipes.#kw##buchheim_graph)(::Array{Any,1}, ::PlotRecipes.#buchheim_graph, ::Array{Array{Int64,1},1}) at <missing>:0
in macro expansion at graphs.jl:268 [inlined]
in apply_recipe(::Dict{Symbol,Any}, ::PlotRecipes.GraphPlot) at RecipesBase.jl:238
in _process_userrecipes(::Plots.Plot{Plots.PyPlotBackend}, ::Dict{Symbol,Any}, ::Tuple{Expr}) at pipeline.jl:73
in _plot!(::Plots.Plot{Plots.PyPlotBackend}, ::Dict{Symbol,Any}, ::Tuple{Expr}) at plot.jl:171
in (::Plots.#kw##plot)(::Array{Any,1}, ::Plots.#plot, ::Expr) at <missing>:0
Looks like the error is thrown from NetworkLayout?
Yes, do you have this issue on your computer?
Yes
Hello @AStupidBear This issue was fixed in the master branch of NetworkLayout but that commit is not included in the release version. Can you please try executing your code in the latest master branch of NetworkLayout? Please post here if the issue persist. A new release supporting 0.6 will be pushed later this weekend. This issue will be fixed in the release version then.
@abhijithanilkumar is this because of something that is implemented in a new way (i.e. do we need to set a version number of NetworkLayout for the new version of PlotRecipes?).
No you need not. This issue was addressed after the previous release. The new release that supports 0.6 will be pushed soon, that will address this issue as well. For now, just checkout to master branch of NetworkLayout before using it.
Appears to be fixed.