def test_random_gpu(self):
environment.init_gpu(0)
environment.init_random(self.seed)
self.assertAlmostEqual(float(environment.array_module().random.random()),
0.5405254640354904)
# TODO(philip30):
# Seems that the cuda.cupy.random draws from a different distribution than
# the one in numpy. For now it is important to first init all model using
# One of the module and convert to the other to ensure that it is producing
# the same result every time training is conducted
评论列表
文章目录