提交 b194565c authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Reduce memory usage in tests on 32-bit platforms

This fixes a crash when running tests on Windows.
上级 94c2e959
......@@ -555,8 +555,14 @@ class test_structureddot(unittest.TestCase):
class DotTests(unittest.TestCase):
def setUp(self):
x_size = (10, 1000)
y_size = (1000, 10000)
# On 32-bit platforms we use smaller matrices to avoid running out of
# memory during tests.
if theano.gof.cmodule.local_bitwidth() <= 32:
x_size = (10, 100)
y_size = (100, 1000)
else:
x_size = (10, 1000)
y_size = (1000, 10000)
self.x_csr = scipy.sparse.csr_matrix(
numpy.random.binomial(1, 0.5, x_size), dtype=theano.config.floatX)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论