MethodError: no method matching randn(::Param{Knet.KnetArrays.KnetVector{Float32}}, ::Param{Knet.KnetArrays.KnetMatrix{Float32}})
Stacktrace:
[1] Linear(inputsize::Param{Knet.KnetArrays.KnetMatrix{Float32}}, outputsize::Param{Knet.KnetArrays.KnetVector{Float32}}, atype::Type, scale::Float64)
@ Main ./In[9]:25
[2] Linear(inputsize::Param{Knet.KnetArrays.KnetMatrix{Float32}}, outputsize::Param{Knet.KnetArrays.KnetVector{Float32}})
@ Main ./In[9]:23
[3] Linear(inputsize::Int64, outputsize::Int64, atype::Type, scale::Float64)
@ Main ./In[9]:28
[4] Linear(inputsize::Int64, outputsize::Int64)
@ Main ./In[9]:23
[5] top-level scope
@ In[9]:39
[6] eval
@ ./boot.jl:360 [inlined]
[7] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
@ Base ./loading.jl:1116
---
If I print outputsize and inputsize in the function, then it prints them as integers.
If I put the exact test values instead of the variable names (outputsize, inputsize), then I get a StackOverflow error, or else it never stops.
I am trying to implement it similarly to the implementation of Embedding.
Also, the embedding cell (which is already implemented), passes the test when I run it on Colab, but not on my machine. It was passing with 1.5.4 with the non-updated version.
Thank you for any help.
Best,
Zeynep