提交 7b13956b authored 作者: Frederic Bastien's avatar Frederic Bastien

fix a test on 32 bits computer

上级 0c6020f2
...@@ -578,7 +578,9 @@ class T_examples(unittest.TestCase): ...@@ -578,7 +578,9 @@ class T_examples(unittest.TestCase):
def test_examples_8(self): def test_examples_8(self):
from theano import shared from theano import shared
state = shared(0) # Force the dtype to int64 to work correctly on 32 bits computer.
# Otherwise, it create by default a int32 on 32 bits computer.
state = shared(numpy.int64(0))
inc = T.iscalar('inc') inc = T.iscalar('inc')
accumulator = function([inc], state, updates=[(state, state+inc)]) accumulator = function([inc], state, updates=[(state, state+inc)])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论