提交 2454257b authored 作者: Sina Honari's avatar Sina Honari

add unit test

上级 1295dbb1
......@@ -986,6 +986,16 @@ class TestElemwise(unittest_tools.InferShapeTester):
[Elemwise(scalar.add)(t_left, t_right)],
[t_left_val, t_right_val], Elemwise)
def test_input_dimensions_overflow(self):
# Elemwise.perform used to compute the product
# of input shapes to check if there was a zero in them,
# it overflowed in this case.
a, b, c, d, e, f = tensor.vectors('abcdef')
s = a + b + c + d + e + f
g = theano.function([a, b, c, d, e, f], s,
mode=theano.compile.Mode(linker='py'))
g(*[numpy.zeros(2 ** 11, config.floatX) for i in range(6)])
def test_gt_grad():
"""A user test that failed.
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论