提交 3bebee7a authored 作者: Frederic's avatar Frederic

Fix error in DebugMode

上级 c66e1cf0
...@@ -459,14 +459,16 @@ class QRFull(Op): ...@@ -459,14 +459,16 @@ class QRFull(Op):
x = as_tensor_variable(x) x = as_tensor_variable(x)
assert x.ndim == 2, "The input of qr function should be a matrix." assert x.ndim == 2, "The input of qr function should be a matrix."
q = theano.tensor.matrix(dtype=x.dtype) q = theano.tensor.matrix(dtype=x.dtype)
if self.mode != 'raw':
r = theano.tensor.matrix(dtype=x.dtype) r = theano.tensor.matrix(dtype=x.dtype)
else:
r = theano.tensor.vector(dtype=x.dtype)
return Apply(self, [x], [q, r]) return Apply(self, [x], [q, r])
def perform(self, node, (x,), (q, r)): def perform(self, node, (x,), (q, r)):
assert x.ndim == 2, "The input of qr function should be a matrix." assert x.ndim == 2, "The input of qr function should be a matrix."
q[0], r[0] = self._numop(x, self.mode)
q[0], r[0] = self._numop(x,
self.mode)
class QRIncomplete(Op): class QRIncomplete(Op):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论