Skip to content

thangtran3112/machine-learning

Repository files navigation

  1. Windows tensorflow compatibility. Linux tensorflow compatibility
  2. Install NVIDIA GPU Driver: Ensure you have the latest NVIDIA GPU driver installed.
  3. Install CUDA Toolkit: Download and install the CUDA Toolkit from the NVIDIA website.
  4. Install cuDNN: Download and install cuDNN from the NVIDIA website.
  5. In order for CUDA toolkit to work, we must also install Visual Studio with Desktop development with C++. See guideline here

Step 2: Install TensorFlow with GPU Support

Install TensorFlow with GPU support using pip:

pip install tensorflow-gpu

Step 3: Verify TensorFlow is Using the GPU

You can verify that TensorFlow is using the GPU by running the following code:

import tensorflow as tf

# Check if TensorFlow is built with GPU support
print("Built with GPU support:", tf.test.is_built_with_cuda())

# List available devices
print("Available devices:")
for device in tf.config.list_physical_devices():
    print(device)

# Check if a GPU is available
print("GPU available:", tf.test.is_gpu_available())

Controlling fan in Ubuntu for Asus laptop: