python-tensorflowHow can I use Python TensorFlow with Nvidia GPUs?
Using Python TensorFlow with Nvidia GPUs
- Install the latest version of TensorFlow with GPU support:
pip install tensorflow-gpu
. - Install the latest Nvidia GPU drivers and CUDA Toolkit.
- Verify your system has a compatible GPU.
- Configure the GPU environment variables:
export CUDA_VISIBLE_DEVICES=0
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
- Run Python code with TensorFlow-GPU:
import tensorflow as tf
tf.test.is_gpu_available()
# Output
True
- Train and evaluate models on the GPU.
- Monitor the GPU usage with the
nvidia-smi
command line tool.
Helpful links
More of Python Tensorflow
- How can I use Python and TensorFlow to handle illegal hardware instructions in Zsh?
- How do I resolve a SymbolAlreadyExposedError when the symbol "zeros" is already exposed as () in TensorFlow Python util tf_export?
- How can I use YOLOv3 with Python and TensorFlow?
- ¿Cómo implementar reconocimiento facial con TensorFlow y Python?
- How do I use Python TensorFlow 1.x?
- How can I determine the best Python version to use for TensorFlow?
- How can I use Python and TensorFlow to implement YOLO object detection?
- How can I use Python TensorFlow in W3Schools?
- How do I install Tensorflow with a Python wheel (whl) file?
- How can I use Python and TensorFlow to run computations on the CPU?
See more codes...