Theano/Theano — Issue #276: Segmentation fault involving scan, shared, subtensors
Author: bayerj
Created: 2011-12-06 11:17:39+00:00
State: open

I have a recurrent neural network of which I calculate the sum of the Hessian wrt inpt which I take the gradient of wrt parameters.

During compilation, lots of optimization errors occur. In one case, theano crashes with a segmentation fault on Mac OS X. In another case, there is an error about sequence shapes.

The code can be found here: https://gist.github.com/1437819#file_gistfile1.txt

Notes:
- Parameters of the model are first created as a long consecutive array--weight matrices are then extracted from that via subtensors. Differentiation takes place wrt the consecutive array. See line 18-28.
- Lines 43, 44 define the function transfer, which is then used in line 47. Using line 43 results in a runtime error (https://gist.github.com/1437819#file_transfer_identity) while using line 44 results in a segfault (https://gist.github.com/1437819#file_transfer_sigmoid)