We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi sorry for bothering if the following bug is trivial. I got this with this example :
𝞗=Dict(:batchsize=>32,:epochs=>80,:ginp=>256,:genh=>[512],:disch=>[512],:optim=>Adam,:lr=>0.0002); xtrn,ytrn,xtst,ytst = mnist() global dtrn = minibatch(xtrn, ytrn, 𝞗[:batchsize]; xtype=atype) global dtst = minibatch(xtst, ytst, 𝞗[:batchsize]; xtype=atype) 𝗪 = (𝗪g,𝗪d) = initweights(𝞗[:genh], 𝞗[:ginp], 784), initweights(𝞗[:disch], 784, 1) 𝚶 = (𝚶pg,𝚶pd) = optimizers(𝗪g, 𝞗[:optim]; lr=𝞗[:lr]), optimizers(𝗪d,𝞗[:optim]; lr=𝞗[:lr]) generate_and_show(𝗪,100,𝞗) runmodel(𝗪, dtst, 𝞗; optim=𝚶, train=false) # initial losses runmodel(𝗪, dtrn, 𝞗; optim=𝚶, train=true, dtst=dtst) # training
Out: UndefVarError: lib not defined
Stacktrace: [1] _broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::Tuple{Tuple{Int64,Int64},Int64,Int64,Int64,Int64,Int64,Int64,Int64,Int64,Bool}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:65 [2] broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:43 [3] #mlp#9(::Float64, ::Function, ::Function, ::typeof(mlp), ::Array{Any,1}, ::KnetArray{Float32,2}) at ./In[11]:3 [4] #mlp at ./none:0 [inlined] [5] #G#11 at ./In[12]:3 [inlined] [6] G(::Array{Any,1}, ::KnetArray{Float32,2}) at ./In[12]:3 [7] generate_and_show(::Tuple{Array{Any,1},Array{Any,1}}, ::Int64, ::Dict{Symbol,Any}) at ./In[15]:2 [8] top-level scope at In[17]:7
A little bit of debugging shows:
BB = 32 xx = 𝒩(𝞗[:ginp], BB) # D(𝗪[1],xx) a = 𝗪[1][1]*mat(xx) b = 𝗪[1][2] size(a),size(b)
Out: ((512, 32), (512, 1))
a.+b
Stacktrace: [1] _broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::Tuple{Tuple{Int64,Int64},Int64,Int64,Int64,Int64,Int64,Int64,Int64,Int64,Bool}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:65 [2] broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:43 [3] top-level scope at In[56]:1
It seems that broadcasting .+ between array(512,32) and array(512,1) produces this error. could anyone help resolve this? thanks in advance!
The text was updated successfully, but these errors were encountered:
Nevertheless 'Array(a).+Array(b)' works. I suppose this is a bug of KnetArray
Sorry, something went wrong.
No branches or pull requests
Hi sorry for bothering if the following bug is trivial. I got this with this example :
Out:
UndefVarError: lib not defined
Stacktrace:
[1] _broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::Tuple{Tuple{Int64,Int64},Int64,Int64,Int64,Int64,Int64,Int64,Int64,Int64,Bool}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:65
[2] broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:43
[3] #mlp#9(::Float64, ::Function, ::Function, ::typeof(mlp), ::Array{Any,1}, ::KnetArray{Float32,2}) at ./In[11]:3
[4] #mlp at ./none:0 [inlined]
[5] #G#11 at ./In[12]:3 [inlined]
[6] G(::Array{Any,1}, ::KnetArray{Float32,2}) at ./In[12]:3
[7] generate_and_show(::Tuple{Array{Any,1},Array{Any,1}}, ::Int64, ::Dict{Symbol,Any}) at ./In[15]:2
[8] top-level scope at In[17]:7
A little bit of debugging shows:
Out:
((512, 32), (512, 1))
Out:
UndefVarError: lib not defined
Stacktrace:
[1] _broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::KnetArray{Float32,2}, ::Tuple{Tuple{Int64,Int64},Int64,Int64,Int64,Int64,Int64,Int64,Int64,Int64,Bool}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:65
[2] broadcasted(::typeof(+), ::KnetArray{Float32,2}, ::KnetArray{Float32,2}) at /home/users/fuch/.julia/packages/Knet/LjPts/src/binary.jl:43
[3] top-level scope at In[56]:1
It seems that broadcasting .+ between array(512,32) and array(512,1) produces this error. could anyone help resolve this? thanks in advance!
The text was updated successfully, but these errors were encountered: