提交 628d17de authored 作者: Frederic's avatar Frederic

Fix a test in floatX=float32

上级 7b3abe25
...@@ -4852,13 +4852,15 @@ def test_tile_grad(): ...@@ -4852,13 +4852,15 @@ def test_tile_grad():
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
# test vector # test vector
grad_tile(vector('x'), [3], rng.randn(5)) grad_tile(vector('x'), [3], rng.randn(5).astype(config.floatX))
# test matrix # test matrix
grad_tile(matrix('x'), [3, 4], rng.randn(2, 3)) grad_tile(matrix('x'), [3, 4], rng.randn(2, 3).astype(config.floatX))
# test tensor3 # test tensor3
grad_tile(tensor3('x'), [3, 4, 5], rng.randn(2, 4, 3)) grad_tile(tensor3('x'), [3, 4, 5],
rng.randn(2, 4, 3).astype(config.floatX))
# test tensor4 # test tensor4
grad_tile(tensor4('x'), [3, 4, 5, 6], rng.randn(2, 4, 3, 5)) grad_tile(tensor4('x'), [3, 4, 5, 6],
rng.randn(2, 4, 3, 5).astype(config.floatX))
class TestARange(unittest.TestCase): class TestARange(unittest.TestCase):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论