New opt: T.dot(A,B)[i] -> T.dot(A[i],B)

This is partial implementation of gh-2151
thanks. It was left over from development. I removed it in a new commit.

On Tue, Oct 7, 2014 at 4:49 AM, Jan Schlüter <notifications@github.com>
wrote:

> In theano/tensor/opt.py:
>
> > +    if not isinstance(node.op, Subtensor):
> > +        return
> > +    if (not node.inputs[0].owner or
> > +        not isinstance(node.inputs[0].owner.op, T.Dot)):
> > +        return
> > +    # If there is other node that use the outputs of the dot
> > +    # We don't want to compute twice the sub part.
> > +    if len(node.inputs[0].clients) > 1:
> > +        return
> > +    # Do we index/slice on the outer dimensions only?
> > +    if node.inputs[0].ndim >= 1 and len(node.op.idx_list) == 1:
> > +        a = node.inputs[0].owner.inputs[0]
> > +        b = node.inputs[0].owner.inputs[1]
> > +        a_sub = node.op.make_node(a, *node.inputs[1:]).outputs[0]
> > +        pad_dim = a.ndim - a_sub.ndim
> > +        return [T.dot(a_sub, b)]
>
> pad_dim is unused. Did you want to do something with it?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/Theano/Theano/pull/2152/files#r18507126>.
>