Theano/Theano — pull request #1104 by delallea (2012-11-30 01:46:51+00:00)
Title: Fixed crash in constant folding optimization

Tentative fix for gh-1096.

Although it fixes the crash reported in that issue, I would like someone more familiar with the code to confirm that the logic is correct.

I'm actually surprised that it's possible for the node not to have any client: could it be a sign of a bug somewhere else? Or is it expected in intermediate graphs during optimization?

Please do not merge yet, I will add a test with the code snippet from gh-1096 once it is confirmed that this is the correct fix.