9951 explained code solutions for 126 technologies


python-tensorflowHow can I set up a Python TensorFlow environment using an AMD GPU?


  1. Install the latest version of Python 3.x from here.
  2. Install the latest version of TensorFlow for AMD GPU from here.
  3. Install the AMD GPU driver from here.
  4. Install the latest version of CUDA Toolkit from here.
  5. Install the latest version of cuDNN from here.
  6. Install the latest version of Anaconda from here.
  7. Create a virtual environment with conda create -n myenv python=3.6 and activate it with conda activate myenv.
import tensorflow as tf

# Check if GPU is available
print(tf.test.is_gpu_available())

Output example

True

Edit this code on GitHub