How do I use TensorFlow GPU?

前端 未结 7 1863
予麋鹿
予麋鹿 2020-11-28 06:00

How do I use TensorFlow GPU version instead of CPU version in Python 3.6 x64?

import tensorflow as tf

Pytho

7条回答
  •  失恋的感觉
    2020-11-28 06:48

    Follow the steps in the latest version of the documentation. Note: GPU and CPU functionality is now combined in a single tensorflow package

    pip install tensorflow
    
    # OLDER VERSIONS pip install tensorflow-gpu
    

    https://www.tensorflow.org/install/gpu

    This is a great guide for installing drivers and CUDA if needed: https://www.quantstart.com/articles/installing-tensorflow-22-on-ubuntu-1804-with-an-nvidia-gpu/

提交回复
热议问题