提交 abea5ca1 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Use reproducible seed in test

上级 abe49e6c
......@@ -1278,8 +1278,11 @@ class TestAlloc(unittest.TestCase):
shared = staticmethod(theano.shared)
allocs = [tensor.Alloc] * 3
def setUp(self):
self.rng = numpy.random.RandomState(seed=utt.fetch_seed())
def test_alloc_constant_folding(self):
test_params = numpy.asarray(numpy.random.randn(50 * 60),
test_params = numpy.asarray(self.rng.randn(50 * 60),
self.dtype)
some_vector = vector('some_vector', dtype=self.dtype)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论