title: Keras ,Tensorflow Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH:?
body: <p>I already installed CUDA 8.0 and copied the cuDNN file in the directory as <a href="https://www.tensorflow.org/versions/master/get_started/os_setup.html#optional-install-cuda-gpus-on-linux" rel="nofollow">Install CUDA (GPUs on Linux)</a> says.</p>
  
  <p>I run mnist_cnn.py and got the following information:</p>
  
  <pre><code>Using TensorFlow backend.
  I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcublas.so locally
  I tensorflow/stream_executor/dso_loader.cc:105] Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH: 
  I tensorflow/stream_executor/cuda/cuda_dnn.cc:3448] Unable to load cuDNN DSO
  I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcufft.so locally
  I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcuda.so.1 locally
  I tensorflow/stream_executor/dso_loader.cc:111] successfully opened CUDA library libcurand.so locally
  X_train shape: (60000, 28, 28, 1)
  60000 train samples
  </code></pre>
  
  <p>and finally</p>
  
  <pre><code>Traceback (most recent call last):
    File "mnist_cnn.py", line 65, in &lt;module&gt;
      model.add(Dropout(0.25))
    File "/home/nsknsl/.local/lib/python3.5/site-packages/keras/models.py", line 308, in add
      output_tensor = layer(self.outputs[0])
    File "/home/nsknsl/.local/lib/python3.5/site-packages/keras/engine/topology.py", line 514, in __call__
      self.add_inbound_node(inbound_layers, node_indices, tensor_indices)
    File "/home/nsknsl/.local/lib/python3.5/site-packages/keras/engine/topology.py", line 572, in add_inbound_node
      Node.create_node(self, inbound_layers, node_indices, tensor_indices)
    File "/home/nsknsl/.local/lib/python3.5/site-packages/keras/engine/topology.py", line 149, in create_node
      output_tensors = to_list(outbound_layer.call(input_tensors[0], mask=input_masks[0]))
    File "/home/nsknsl/.local/lib/python3.5/site-packages/keras/layers/core.py", line 90, in call
      x = K.in_train_phase(K.dropout(x, self.p, noise_shape), x)
    File "/home/nsknsl/.local/lib/python3.5/site-packages/keras/backend/tensorflow_backend.py", line 1304, in in_train_phase
      x = tf.python.control_flow_ops.cond(tf.cast(_LEARNING_PHASE, 'bool'),
  AttributeError: module 'tensorflow.python' has no attribute 'control_flow_ops'
  Exception ignored in: &lt;bound method BaseSession.__del__ of &lt;tensorflow.python.client.session.Session object at 0x7ff2a70e4ba8&gt;&gt;
  Traceback (most recent call last):
    File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/client/session.py", line 532, in __del__
  AttributeError: 'NoneType' object has no attribute 'TF_DeleteStatus'
  </code></pre>
  
  <p>so how can I load cuDNN DSO ?</p>