提交 3aa24b54 authored 作者: Frederic Bastien's avatar Frederic Bastien

added test for CudaNdarray_inplace_add with tensor of 3,4 and 5 dimensions.

上级 5aa4edea
...@@ -16,7 +16,11 @@ def test_host_to_device(): ...@@ -16,7 +16,11 @@ def test_host_to_device():
assert numpy.all(a == c) assert numpy.all(a == c)
def test_add(): def test_add():
for shape in ((), (0,), (3,), (2,3), (1,10000000),(10,1000000), (100,100000),(1000,10000),(10000,1000)): for shape in ((), (0,), (3,), (2,3), (1,10000000),(10,1000000), (100,100000),
(1000,10000),(10000,1000),
(4100,33,34),(33,4100,34),(33,34,4100),
(4100,33,34,6),(33,4100,34,6),(33,34,4100,6),(33,34,6,4100),
(33,34,35,36,37)):
a0 = theano._asarray(numpy.random.rand(*shape), dtype='float32') a0 = theano._asarray(numpy.random.rand(*shape), dtype='float32')
a1 = a0.copy() a1 = a0.copy()
b0 = cuda_ndarray.CudaNdarray(a0) b0 = cuda_ndarray.CudaNdarray(a0)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论