Installing tensorflow-gpu in Conda
Apr 23, 2021
Check if your computer supports gpu (if nvidia processor, you can use the following.
nvidia-smi
You will see an output similar to the following (of course, the configurations will be different)
Make sure you remove the cpu version first
conda remove tensorflow
Then, install the gpu version
conda install tensorflow-gpu
Now let’s check if tensorflow gpu version is available from Python:
import tensorflow as tf
tf.test.is_gpu_available()
This should return True.
The above method is actually deprecated. You can get the list of GPUs to make sure that you are using the GPU version, not the CPU:
tf.config.list_physical_devices('GPU')
Let the power of GPU amaze you!