提交 efed2a4e authored 作者: Frederic's avatar Frederic

pep8 fix.

上级 83521a43
......@@ -161,26 +161,29 @@ def test_rop_lop():
def test_det():
rng = numpy.random.RandomState(utt.fetch_seed())
r = rng.randn(5,5)
r = rng.randn(5, 5)
x = tensor.matrix()
f = theano.function([x],det(x))
f = theano.function([x], det(x))
assert numpy.linalg.det(r) == f(r)
def test_det_grad():
rng = numpy.random.RandomState(utt.fetch_seed())
r = rng.randn(5,5)
r = rng.randn(5, 5)
tensor.verify_grad(det, [r], rng=numpy.random)
def test_det_shape():
rng = numpy.random.RandomState(utt.fetch_seed())
r = rng.randn(5,5)
r = rng.randn(5, 5)
x = tensor.matrix()
f = theano.function([x],det(x))
f_shape = theano.function([x],det(x).shape)
f = theano.function([x], det(x))
f_shape = theano.function([x], det(x).shape)
assert numpy.all(f(r).shape == f_shape(r))
def test_extract_diag():
rng = numpy.random.RandomState(utt.fetch_seed())
x = theano.tensor.matrix()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论