Keras ,Tensorflow Couldn't open CUDA library libcudnn.so. LD_LIBRARY_PATH:? -
i installed cuda 8.0 , copied cudnn file in directory install cuda (gpus on linux) says.
i run mnist_cnn.py , got following information:
using tensorflow backend. tensorflow/stream_executor/dso_loader.cc:111] opened cuda library libcublas.so locally tensorflow/stream_executor/dso_loader.cc:105] couldn't open cuda library libcudnn.so. ld_library_path: tensorflow/stream_executor/cuda/cuda_dnn.cc:3448] unable load cudnn dso tensorflow/stream_executor/dso_loader.cc:111] opened cuda library libcufft.so locally tensorflow/stream_executor/dso_loader.cc:111] opened cuda library libcuda.so.1 locally tensorflow/stream_executor/dso_loader.cc:111] opened cuda library libcurand.so locally x_train shape: (60000, 28, 28, 1) 60000 train samples
and finally
traceback (most recent call last): file "mnist_cnn.py", line 65, in <module> 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: <bound method basesession.__del__ of <tensorflow.python.client.session.session object @ 0x7ff2a70e4ba8>> 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'
so how can load cudnn dso ?
as mentioned in comments, if didn't yet, need run following commands set environment variables:
export ld_library_path="$ld_library_path:/usr/local/cuda/lib64:/usr/local/cuda/extras/cupti/lib64" export cuda_home=/usr/local/cuda
you can add these commands end of ~/.bashrc executed next time login.
Comments
Post a Comment