提交 2ffbd9fa authored 作者: Frederic Bastien's avatar Frederic Bastien

use deterministic seed following code review.

上级 26ed389c
...@@ -582,7 +582,8 @@ def makeSharedTester(shared_constructor_, ...@@ -582,7 +582,8 @@ def makeSharedTester(shared_constructor_,
shp = (1024,1024) shp = (1024,1024)
#Test the case with all zeros element #Test the case with all zeros element
for x in [numpy.asarray(numpy.random.rand(*shp), dtype=dtype), rng = numpy.random.RandomState(utt.fetch_seed())
for x in [numpy.asarray(rng.rand(*shp), dtype=dtype),
numpy.zeros(shp, dtype=dtype)]: numpy.zeros(shp, dtype=dtype)]:
zeros = (x==0).all() zeros = (x==0).all()
x = self.cast_value(x) x = self.cast_value(x)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论