No, there's an assert in ShapeFeature. I thought it would be more correct
to put the guard here as opposed to ShapeFeature, but what do you think?

On Wed, Mar 27, 2013 at 12:08 PM, lamblin <notifications@github.com> wrote:

> In theano/tensor/opt.py:
>
> > @@ -1078,7 +1078,8 @@ def __init__(self):
> >          Optimizer.__init__(self)
> >
> >      def add_requirements(self, fgraph):
> > -        fgraph.attach_feature(ShapeFeature())
> > +        if not hasattr(fgraph, 'shape_feature'):
> > +            fgraph.attach_feature(ShapeFeature())
>
> Is it not already taken care of by attach_feature itself?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1308/files#r3553958>
> .
>