local_shape_to_shape_i

118 views
Skip to first unread message

James Bergstra

unread,
Jan 24, 2012, 6:09:24 PM1/24/12
to thean...@googlegroups.com
Current trunk is giving loads of errors like [1]:

Is anyone currently working on fixes to this optimization? Or is this a new issue that I should look into?

[1]
=================
ERROR (theano.gof.opt): Optimization failure due to: local_shape_to_shape_i
ERROR (theano.gof.opt): TRACEBACK:
ERROR (theano.gof.opt): Traceback (most recent call last):
  File "/home/jbergstra/cvs/PYTHONPATH/theano/gof/opt.py", line 928, in process_node
    replacements = lopt.transform(node)
  File "/home/jbergstra/cvs/PYTHONPATH/theano/tensor/opt.py", line 1097, in local_shape_to_shape_i
    return [shape_feature.make_vector_shape(node.inputs[0])]
  File "/home/jbergstra/cvs/PYTHONPATH/theano/tensor/opt.py", line 868, in make_vector_shape
    return make_vector(*self.shape_of[r])
KeyError: <montetheano.distributions.Categorical object at 0x5b72c90>.1

Olivier Delalleau

unread,
Jan 24, 2012, 8:03:33 PM1/24/12
to thean...@googlegroups.com
I don't have this error when running the test suite (rev 0c1dcab).

-=- Olivier

2012/1/24 James Bergstra <james.b...@gmail.com>

Frédéric Bastien

unread,
Jan 25, 2012, 1:10:32 PM1/25/12
to thean...@googlegroups.com
I never saw this error too.

Fred

Arnaud Bergeron

unread,
Jan 25, 2012, 4:14:06 PM1/25/12
to thean...@googlegroups.com
I think there is a clue in the key here:

KeyError: <montetheano.distributions.Categorical object at 0x5b72c90>.1

This means that James is using montetheano which might be responsible
for the problem (Note that I have no idea what it is).

--
La brigade SnW veut vous recruter - http://www.brigadesnw.ca

James Bergstra

unread,
Jan 25, 2012, 4:19:37 PM1/25/12
to thean...@googlegroups.com
Update: the bug here was caused by two things:

1. incorrect infer_shape implementations in MonteTheano

2. failure to fail properly in ShapeOptimizer

The trouble is that the ShapeOptimizer throws an exception during on_attach(), and then local_shape_to_shape_i spews out a million errors because the ShapeOptimizer couldn't initialize itself properly.

I fixed it via (1) and provided a more diagnostic error in a recent PR, but one could go further to make the ShapeOptimizer on_attach more robust.

- james
Reply all
Reply to author
Forward
0 new messages