Theano fails to be imported with theano configuration cnmem = 1
<p>Theano fails to be imported with theano configuration cnmem = 1</p>

<p>Any idea how to make sure the GPU is totally allocated to the theano python script?</p>

<blockquote>
  <p><strong>Note:</strong> Display is not used to avoid its GPU usage</p>
</blockquote>

<p><strong>File: .theanorc</strong></p>

<pre><code>cnmem = 1
</code></pre>

<p><strong>File: test.py</strong></p>

<pre><code>print 'Importing Theano Library ...'
import theano
print 'Imported'
</code></pre>

<p><strong>Output:</strong></p>

<pre><code>$ python test.py 
Importing Theano Library ... 
Killed 
$
</code></pre>

<p>It only works with cnmem = 0.75</p>

<p><strong>File: .theanorc</strong></p>

<pre><code>cnmem = 0.75
</code></pre>

<p><strong>Output:</strong></p>

<pre><code>$ python test.py
Importing Theano Library ...
Imported
$ 
</code></pre>

<p><a href="https://github.com/Theano/Theano/issues/4302#issuecomment-202067917" rel="nofollow">https://github.com/Theano/Theano/issues/4302#issuecomment-202067917</a></p>

<blockquote>
  <p>Could you try with 1.0 instead of 1? according to the docs, it needs
  to be a float. Also, it is limited to 0.95 to allow space for device
  drivers. So, you can't use the entire GPU memory just like you can't
  use all of RAM.</p>
</blockquote>

python neural-network deep-learning theano theano-cuda