Theano with Keras on Raspberry Pi
<p>I am trying to get Theano to run with Keras on a Raspberry Pi 3 (B) without success. I tried Ubuntu MATE and Raspbian as operating systems, without success. To install Theano and Keras, I have taken following steps:</p>

<ol>
<li>Install miniconda (armv7 distribution)</li>
<li>Install all Theano dependencies (as shown <a href="http://deeplearning.net/software/theano/install_ubuntu.html" rel="noreferrer">here</a>) through Conda (if possible), <code>pip</code> and <code>apt-get</code></li>
<li>Install Theano </li>
<li>Install Keras</li>
</ol>

<p>The aforementioned steps work without any issues. In the next step, I built a little test script (test.py) which loads an already built model via </p>

<pre><code>from keras.models import load_model
model = load_model('model.hdf5')
</code></pre>

<p>When the model is being loaded, I get the following error</p>

<pre><code>Segmentation fault (core dumped)
</code></pre>

<p>Then I tried to investigate the issue further, following this answer on SO (<a href="https://stackoverflow.com/questions/10035541/what-causes-a-python-segmentation-fault">What causes a Python segmentation fault?</a>):</p>

<pre><code>gdb python
&gt; run test.py
</code></pre>

<p>When I run this I get:</p>

<pre><code>Program received SIGSEV, Segmentation fault.
0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
</code></pre>

<p>In the next step I ran in the gdb shell:</p>

<pre><code>&gt; backtrace
</code></pre>

<p>and got</p>

<pre><code>#0  0x76fd9822 in ?? () from /lib/ld-linux-armhf.so.3
#1  0x76fd983a in ?? () from /lib/ld-linux-armhf.so.3
</code></pre>

<p>this is the point where I don't know any further and I would like to ask, if anyone could point me into a direction on how to fix this issue and get keras + theano to run on a Raspberry Pi.</p>

<p>(I have also tried TensorFlow as an alternative, but getting the same issue)</p>

<p>Thanks a lot.</p>

<hr>

<p>EDIT</p>

<p>I have done some more investigations. If I <a href="https://github.com/samjabrahams/tensorflow-on-raspberry-pi" rel="noreferrer">run Keras with TensorFlow</a> the problem seems to change a little bit. I ran gdb again, but the error happens now in numpy, especially in libopenblas.so.0</p>

<pre><code>Program received signal SIGSEV, Segmentation fault.
0x75ead7cc in inner_thread()
from /home/&lt;path&gt;/numpy/core/../../../../libopenblas.so.0
</code></pre>

<p>Does this help?</p>

<hr>

<p>EDIT 2</p>

<p>I have installed everything without using Miniconda and Keras works now with TensorFlow (but not with Theano yet). </p>