提交 36db9ba0 authored 作者: Frederic's avatar Frederic

Add test for specify shape in the new back-end.

上级 196e5406
......@@ -33,3 +33,10 @@ def test_values_eq_approx():
b = a.copy()
b[0] = -numpy.asarray(b[0])
assert not GpuArrayType.values_eq_approx(a, b)
def test_specify_shape():
a = rand_gpuarray(20, dtype='float32')
g = GpuArrayType(dtype='float32', broadcastable=(False,))('g')
f = theano.function([g], theano.tensor.specify_shape(g, [20]))
f(a)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论