Most of the functions will be single outputs and I think a nontrivial
number will be single input.


On Mon, Mar 31, 2014 at 9:37 PM, abergeron <notifications@github.com> wrote:

> In theano/compile/ops.py:
>
> > +            outs = (outs,)
> > +        assert len(outs) == len(outputs)
> > +        for i in range(len(outs)):
> > +            outputs[i][0] = outs[i]
> > +
> > +def as_op(itypes, otypes):
> > +    """
> > +    Decorator that converts a function into a basic theano op that
> > +    will call the supplied function as its implementation.
> > +
> > +    This should not be used when performance is a concern since the
> > +    very basic nature of the resulting Op may interfere with certain
> > +    graph optimizations.
> > +
> > +    Example usage:
> > +       @as_op(itypes=[theano.tensor.fmatrix(), theano.tensor.fmatrix()],
>
> Yes, it's a simple addition. But I wonder how much would it buy. Are there
> really a lot of single input, single output functions to turn into theano
> ops?
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1785/files#r11147320>
> .
>