Windows platform installation TensorFlow GPU

Verbatim https://www.dazhuanlan.com/2019/08/26/5d63016142d97/


International practice, see the official documents. The official recommended pipinstallation, you need to install before installing TensorFlow

CUDA 10.1
cuDNN 7.6
Microsoft Visual C++ 2015 Redistributable Update 3

Then execute

pip install tensorflow-gpu

Installation.

Test installation was successful:

import tensorflow as tf

Error, suggesting missing DLL files. Editor's Note found a bit, most people solve method is to install VC++ 2015 Redistributable Update 3, reinstall VC++ 2015 Update 3after uninstalling TensorFlow-GPUand then install, or reported the same mistakes.

In other mounting Conda

Pretending PyTorchto see the official installation documentation useful Condainstallation method, you take the opportunity in TensorFlowthe try.

# 安装 PyTorch
conda install pytorch torchvision cudatoolkit=10.0 -c pytorch
# 安装 TensorFlow
conda install tensorflow-gpu

After installation test:

import tensorflow as tf
import torch

No error, the success of the installation.

Guess you like

Origin www.cnblogs.com/petewell/p/11410475.html