提交 27c5b8e1 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

Fix to failing test

It seems that even the last fix of the generated random numbers didn't do the trick. The reason being same numeric instability. I've change the operation to a sum, which, if you apply it recursevly is less problematic then multiplying numbers
上级 976d2fb9
...@@ -2875,7 +2875,7 @@ class T_Scan(unittest.TestCase): ...@@ -2875,7 +2875,7 @@ class T_Scan(unittest.TestCase):
# The test is based on the code provided by Timothy Lillicrap # The test is based on the code provided by Timothy Lillicrap
def onestep(xdl, xprev, w): def onestep(xdl, xprev, w):
xnew = tensor.tanh(tensor.dot(w, xprev)) xnew = w + xprev
return xnew return xnew
xinit = tensor.tensor3('xinit') xinit = tensor.tensor3('xinit')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论