Skip to content
New issue

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

example does not work under Julia >= 1.0 #3

Open
obviousnic opened this issue Dec 22, 2019 · 6 comments
Open

example does not work under Julia >= 1.0 #3

obviousnic opened this issue Dec 22, 2019 · 6 comments

Comments

@obviousnic
Copy link

I made some obvious syntax changes to get the example to run under julia 1.3/Knet 132,
but it fails with this error

ERROR: LoadError: MethodError: Cannot `convert` an object of type UnitRange{Int64} to an object of type Colon
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:167
Stacktrace:
 [1] convert(::Type{Tuple{Colon,UnitRange{Int64},Colon,Colon}}, ::Tuple{UnitRange{Int64},Colon,Colon,Colon}) at ./essentials.jl:304
 [2] setindex!(::Array{Tuple{Colon,UnitRange{Int64},Colon,Colon},1}, ::Tuple{UnitRange{Int64},Colon,Colon,Colon}, ::Int64) at ./array.jl:766
 [3] copyto!(::Array{Tuple{Colon,UnitRange{Int64},Colon,Colon},1}, ::Int64, ::Array{Tuple{UnitRange{Int64},Colon,Colon,Colon},1}, ::Int64, ::Int64) at ./abstractarray.jl:842
 [4] append!(::Array{Tuple{Colon,UnitRange{Int64},Colon,Colon},1}, ::Array{Tuple{UnitRange{Int64},Colon,Colon,Colon},1}) at ./array.jl:895
 [5] addto!(::AutoGrad.Sparse{Float64,4}, ::AutoGrad.Sparse{Float64,4}) at /root/.julia/packages/AutoGrad/pTNVv/src/addto.jl:44
 [6] #differentiate#3(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(AutoGrad.differentiate), ::Function, ::Param{KnetArray{Float64,4}}, ::Vararg{Any,N} where N) at /root/.julia/packages/AutoGrad/pTNVv/src/core.jl:166
 [7] differentiate(::Function, ::Param{KnetArray{Float64,4}}, ::Vararg{Any,N} where N) at /root/.julia/packages/AutoGrad/pTNVv/src/core.jl:135
 [8] (::getfield(AutoGrad, Symbol("##gradfun#6#8")){typeof(loss),Int64,Bool})(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::getfield(AutoGrad, Symbol("#gradfun#7")){getfield(AutoGrad, Symbol("##gradfun#6#8")){typeof(loss),Int64,Bool}}, ::KnetArray{Float64,4}, ::Vararg{Any,N} where N) at /root/.julia/packages/AutoGrad/pTNVv/src/core.jl:225
 [9] (::getfield(AutoGrad, Symbol("#gradfun#7")){getfield(AutoGrad, Symbol("##gradfun#6#8")){typeof(loss),Int64,Bool}})(::KnetArray{Float64,4}, ::Vararg{Any,N} where N) at /root/.julia/packages/AutoGrad/pTNVv/src/core.jl:221
 [10] style_transfer(::String, ::String, ::Int64, ::Int64, ::Int64, ::Float64, ::NTuple{5,Int64}, ::Array{Float64,1}, ::Float64, ::Bool) at /work/neural_style_transfer.jl:365
 [11] style_transfer(::String, ::String, ::Int64, ::Int64, ::Int64, ::Float64, ::NTuple{5,Int64}, ::Array{Float64,1}, ::Float64) at /work/neural_style_transfer.jl:329
 [12] top-level scope at util.jl:156
 [13] include at ./boot.jl:328 [inlined]
 [14] include_relative(::Module, ::String) at ./loading.jl:1094
 [15] include(::Module, ::String) at ./Base.jl:31
 [16] include(::String) at ./client.jl:431
 [17] top-level scope at REPL[1]:1
in expression starting at /work/neural_style_transfer.jl:397
@cemilcengiz
Copy link
Collaborator

Hi, can you please share more details about the problem, and the full notebook you are working on?

@obviousnic
Copy link
Author

obviousnic commented Jan 3, 2020 via email

@cemilcengiz
Copy link
Collaborator

Hi, apparently you failed to attach the notebook. Can you try adding the code to the comment or sharing it with gist instead?

@obviousnic
Copy link
Author

obviousnic commented Jan 6, 2020 via email

@cemilcengiz
Copy link
Collaborator

Nope, I have still not received it. Maybe, attachment is not supported for github issue replies via e-mail.

@obviousnic
Copy link
Author

obviousnic commented Jan 26, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants