maths test

This commit is contained in:
Mike J Innes 2017-03-29 18:34:54 +01:00
parent 5111db4037
commit 5dde752f35
1 changed files with 1 additions and 0 deletions

View File

@ -13,6 +13,7 @@ end
r = Recurrent(10, 5)
xs = [rand(10) for _ = 1:3]
_, ys = apply(stateless(unroll1(r)), xs, (squeeze(r.y.x, 1),))
@test ys[1] == squeeze(tanh(reshape(xs[1],(1,10)) * r.Wxy.x .+ r.y.x * r.Wyy.x .+ r.by.x), 1)
ru = unroll(r, 3)
@test ru(Seq(xs)) == ys
end