denizyuret / Knet.jl

Koç University deep learning framework.
https://denizyuret.github.io/Knet.jl/latest
Other
1.43k stars 230 forks source link

1.1.2 Todo List #366

Open denizyuret opened 6 years ago

denizyuret commented 6 years ago
kirnap commented 6 years ago

I think following features would make new RNN more safe:

denizyuret commented 6 years ago

Can you give examples?

kirnap commented 6 years ago
# suppose we are given
r = RNN(8, 10); 
# 1
x1 = KnetArray{Float32}(rand(8,1));
x2 = KnetArray{Float32}(rand(1128, 1));
r(x1);
r(x2); # why this call does not trigger any error?

# 2
# I know why it does not work  which is (r.dataType == Float32 by default),
r(KnetArray(rand(8,1)))  # throws not a user-friend error
# We may put somewhere in rnnforw @assert(r.dataType == eltype(input), "Conflicting types...")