I'm using Anaconda (in Ubuntu 18.04) and I have an environment with Keras (and tensorflow-gpu) installed. Here are the different versions:
The version are chosen by Conda, but I'm wondering why it downloaded 10.0 when nvidia-smi shows me that my cuda should be (or is?) 10.1:
NVIDIA-SMI 435.21 Driver Version: 435.21 CUDA Version: 10.1
But, fun fact, when I do nvcc --version:
Cuda compilation tools, release 9.1, V9.1.85
So here comes my question(s): what version of Cuda am I using? What version of Cuda should I be using? Does Anaconda handle Cuda by environment?
PS: (this is not my question, but why I ask it)
I'm asking that because I'm running into this issue:
tensorflow/stream_executor/cuda/cuda_dnn.cc:329] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
I looked for an solution ( could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR ) but none of the answer I tried worked (deleting files, running in sudo, etc) so I think it's a compatibility issue
Note: altough I do not consider this answer as THE solution, it allowed me to continue working on my project so it's good enough for the moment.
Now, this doesn't fix the bug:
Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
A working solution (but still not awesome) is to add the following code on top of your python file (I use Keras, but it works with TensorFlow alone as well):
from keras.backend.tensorflow_backend import set_session
import tensorflow as tf
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
set_session(sess)
And it's (apparently) working!
Big thanks to Berkay of his support!
(technically, try to delete the old versions before adding another one, but it works too)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.