You are right that the current exception do that. It wasn't the case when
the old code was done. So now we can remove this.

caglar, remove it for your op. If you want, remove it for the others too,
otherwise, we'll do this, it is quick.


On Wed, May 7, 2014 at 12:52 PM, abergeron <notifications@github.com> wrote:

> In theano/sandbox/linalg/ops.py:
>
> > +        x = as_tensor_variable(x)
> > +        assert x.ndim == 2, "The input of svd function should be a matrix."
> > +        w = theano.tensor.matrix(dtype=x.dtype)
> > +        u = theano.tensor.matrix(dtype=x.dtype)
> > +        v = theano.tensor.matrix(dtype=x.dtype)
> > +        return Apply(self, [x], [w, u, v])
> > +
> > +    def perform(self, node, (x,), (w, u, v)):
> > +        try:
> > +            assert x.ndim == 2, "The input of svd function should be a matrix."
> > +            w[0], u[0], v[0] = self._numop(x,
> > +                                           self.full_matrices,
> > +                                           self.compute_uv)
> > +        except numpy.linalg.LinAlgError:
> > +            logger.debug('Failed to find %s of %s' % (self._numop.__name__,
> > +                                                      node.inputs[0]))
>
> I don't think this provides any new information. The standard
> exception-cacthing code will add the node (which contains the function
> name) and the inputs to the message.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1827/files#r12388105>
> .
>