Hi Federico,
Julia is pretty picky about types. In particular the array/element types used in your model and your data must match. RNN prefers the KnetArray{Float32} type (if gpu is available), or Array{Float32} (if gpu not available) as most deep learning work is done using low precision on a gpu. rand() on the other hand defaults to Array{Float64}. The following should fix the mismatch:
model = RNN(K, K, usegpu=false, dataType=Float64)
However note that RNNs are really slow on the CPU, so a better fix would be:
data = [(KnetArray(rand(Float32, K, B, L)), KnetArray(rand(Float32, K, B, L))) for i in 1:400]
Finally element-wise / broadcasting operations require a dot in the Julia 1.0 syntax, i.e. after abs:
(x, y) -> mean(abs.(model(x) - y))
This is motivated by the fact that sqrt(x) and sqrt.(x) may mean different things.
About slack: I am not sure how to add/invite people, so if you figure it out let me know what to do. (You may need a slack id and/or be a member of the Julia slack first?)
best,
deniz