提交 50cb3c06 authored 作者: Tanjay94's avatar Tanjay94

Fixed small mistakes in code.

上级 e8050919
......@@ -1047,7 +1047,7 @@ class QRFull(Op):
self.mode)
def __str__(self):
return self._numop.__name__.capitalize()
return self._numop.__class__.__name__
class QRIncomplete(Op):
......@@ -1082,7 +1082,7 @@ class QRIncomplete(Op):
self.mode)
def __str__(self):
return self._numop.__name__.capitalize()
return self._numop.__class__.__name__
def qr(a, mode="full"):
......@@ -1115,6 +1115,9 @@ def qr(a, mode="full"):
must be spelled out.
Default mode is 'full' which is also default for numpy 1.6.1.
Note: Default mode was left to full as full and reduced are both doing
the same thing in the new numpy version but only full works on the old
previous numpy version.
Returns :
---------
q : matrix of float or complex, optional
......
......@@ -176,6 +176,7 @@ def test_matrix_dot():
assert _allclose(numpy_sol, theano_sol)
def test_qr_default():
rng = numpy.random.RandomState(utt.fetch_seed())
A = tensor.matrix("A", dtype=theano.config.floatX)
......@@ -245,6 +246,7 @@ def test_svd():
assert _allclose(n_v, t_v)
assert _allclose(n_t, t_t)
def test_inverse_singular():
singular = numpy.array([[1, 0, 0]] + [[0, 1, 0]] * 2,
dtype=theano.config.floatX)
......@@ -256,6 +258,7 @@ def test_inverse_singular():
return
assert False
def test_inverse_grad():
rng = numpy.random.RandomState(utt.fetch_seed())
r = rng.randn(4, 4)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论