提交 2a01f496 authored 作者: David Warde-Farley's avatar David Warde-Farley

Fix two problems with the knownfail complex tests that Fred caught.

上级 4cc35b22
...@@ -934,26 +934,26 @@ def test_clip_complex_value(): ...@@ -934,26 +934,26 @@ def test_clip_complex_value():
f(aval, bval, cval)) f(aval, bval, cval))
for dtype in ['complex64', 'complex128']: for dtype in ['complex64', 'complex128']:
av = randcomplex(5).astype(dtype) av = randcomplex(5).astype(dtype)
bv = np.array(-1) bv = numpy.array(-1)
cv = np.array(1) cv = numpy.array(1)
a = tensor.vector(dtype=dtype) a = tensor.vector(dtype=dtype)
b = tensor.scalar() b = tensor.scalar()
c = tensor.scalar() c = tensor.scalar()
yield check, a, b, c, av, bv, cv yield check, a, b, c, av, bv, cv, dtype
av = rand(5) av = rand(5)
bv = np.array(-1+1j).astype(dtype) bv = numpy.array(-1+1j).astype(dtype)
cv = np.array(1) cv = numpy.array(1)
a = tensor.vector() a = tensor.vector()
b = tensor.scalar(dtype=dtype) b = tensor.scalar(dtype=dtype)
c = tensor.scalar() c = tensor.scalar()
yield check, a, b, c, av, bv, cv yield check, a, b, c, av, bv, cv, dtype
av = rand(5) av = rand(5)
bv = np.array(-1) bv = numpy.array(-1)
cv = np.array(1+1j).astype(dtype) cv = numpy.array(1+1j).astype(dtype)
a = tensor.vector() a = tensor.vector()
b = tensor.scalar() b = tensor.scalar()
c = tensor.scalar(dtype=dtype) c = tensor.scalar(dtype=dtype)
yield check, a, b, c, av, bv, cv yield check, a, b, c, av, bv, cv, dtype
#TODO: consider moving this function / functionality to gradient.py #TODO: consider moving this function / functionality to gradient.py
# rationale: it's tricky, and necessary everytime you want to verify # rationale: it's tricky, and necessary everytime you want to verify
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论