Knet issue


#1

Hi Guys!
I am trying to go through the tutorial here.
But I am getting the error:

Cannot find libknet8, please rerun Pkg.build("Knet").

Stacktrace:
 [1] im2col!(::Array{Float64,4}, ::Array{Float64,4}, ::Array{Float64,2}, ::Int64, ::Int64, ::Int64, ::Int64, ::Int64, ::Int64) at /home/subhankar/.julia/v0.6/Knet/src/conv.jl:503
 [2] #conv4#322(::Int64, ::Int64, ::Int64, ::Int64, ::Int64, ::Array{Any,1}, ::Function, ::Array{Float64,4}, ::Array{Float64,4}) at /home/subhankar/.julia/v0.6/Knet/src/conv.jl:431
 [3] (::Knet.#kw##conv4)(::Array{Any,1}, ::Knet.#conv4, ::Array{Float64,4}, ::Array{Float64,4}) at ./<missing>:0
 [4] convx(::Array{Float64,4}, ::Array{Array{Float64,4},2}) at ./In[6]:69
 [5] (::#convnet#23{Array{Array{Array{Float64,4},2},1},Array{Any,1},Array{Any,1}})(::Array{Float64,4}) at ./In[6]:53
 [6] style_transfer(::String, ::String, ::Int64, ::Int64, ::Int64, ::Float64, ::NTuple{5,Int64}, ::Array{Float64,1}, ::Float64, ::Bool) at ./In[12]:27
 [7] style_transfer(::String, ::String, ::Int64, ::Int64, ::Int64, ::Float64, ::NTuple{5,Int64}, ::Array{Float64,1}, ::Float64) at ./In[12]:25
 [8] include_string(::String, ::String) at ./loading.jl:522
 [9] execute_request(::ZMQ.Socket, ::IJulia.Msg) at /home/subhankar/.julia/v0.6/IJulia/src/execute_request.jl:193
 [10] (::Compat.#inner#6{Array{Any,1},IJulia.#execute_request,Tuple{ZMQ.Socket,IJulia.Msg}})() at /home/subhankar/.julia/v0.6/Compat/src/Compat.jl:189
 [11] eventloop(::ZMQ.Socket) at /home/subhankar/.julia/v0.6/IJulia/src/eventloop.jl:8
 [12] (::IJulia.##13#16)() at ./task.jl:335

On running ‘Pkg.build(“Knet”)’ I am getting this:

 INFO: Building Knet
WARNING: no compilers found, libknet8 will not be built.
INFO: Compiling Knet cache.

I am on Julia 0.6(Ubuntu 18). Can you guys tell me the issue. Thanks!


#2

Try with Julia 1.0.


#3

include(Pkg.dir("Knet","data","imagenet.jl")) #imagenet.jl includes matconvnet function etc.

gives error:

┌ Info: Precompiling MAT [23992714-dd62-5051-b70f-ba57cb901cac]
└ @ Base loading.jl:1192
ERROR: LoadError: LoadError: syntax: extra token “MatlabHDF5File” after end of expression
Stacktrace:
[1] include at ./boot.jl:317 [inlined]
[2] include_relative(::Module, ::String) at ./loading.jl:1044
[3] include at ./sysimg.jl:29 [inlined]
[4] include(::String) at /home/subhankar/.julia/packages/MAT/Pn0pR/src/MAT.jl:27
[5] top-level scope at none:0
[6] include at ./boot.jl:317 [inlined]
[7] include_relative(::Module, ::String) at ./loading.jl:1044
[8] include(::Module, ::String) at ./sysimg.jl:29
[9] top-level scope at none:2
[10] eval at ./boot.jl:319 [inlined]
[11] eval(::Expr) at ./client.jl:393
[12] top-level scope at ./none:3
in expression starting at /home/subhankar/.julia/packages/MAT/Pn0pR/src/MAT_HDF5.jl:39
in expression starting at /home/subhankar/.julia/packages/MAT/Pn0pR/src/MAT.jl:31
Failed to precompile MAT [23992714-dd62-5051-b70f-ba57cb901cac] to /home/subhankar/.julia/compiled/v1.0/MAT/3FHIv.ji.

Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at ./logging.jl:311 [inlined]
[3] compilecache(::Base.PkgId, ::String) at ./loading.jl:1190
[4] macro expansion at ./logging.jl:309 [inlined]
[5] _require(::Base.PkgId) at ./loading.jl:947
[6] require(::Base.PkgId) at ./loading.jl:858
[7] macro expansion at ./logging.jl:309 [inlined]
[8] require(::Module, ::Symbol) at ./loading.jl:840
[9] include at ./boot.jl:317 [inlined]
[10] include_relative(::Module, ::String) at ./loading.jl:1044
[11] include(::Module, ::String) at ./sysimg.jl:29
[12] include(::String) at ./client.jl:392
[13] top-level scope at In[4]:1