- This tutorial only tests in the following list environment, and it is for
tensorflow-gpu 2.0version.
- Windows10
- NVIDIA GTX1080ti,GTX2080ti
- If you just want to create a
tensorflow-gpu 2.0environment and do not care other python environment, you can download the two files from NVIDIA official website.Must note that TF2 only work with CUDA>=10 and cuDNN>=7.5.
- After downloading, you can follow the traditional methods to install them.
- If you want to keep your old environment and create new
tensorflow-gpu 2.0environment, you must follow the following steps. First download the two files through my Cloud disk.There are.bzfiles and can be install bypip. You can download from other sources if find the same files.
- CUDA (Extracted code:csce)
- cuDNN (Extracted code:p4ya)
(If invalid please contact me with e-mail feixue@nuaa.edu.cn)
After downloading, you get two files end with.bz2. Do not hurry to install. Here comes the key steps.
TF2 Onlycan skip this step.- To keep the old environment safe, use the following methods.
- Install Miniconda:
Download Miniconda and install normally. - Use conda creating independent environment:
Open conda in command line and create a environment must with python>=3.6
conda create -n tf2 python=3.6- Install CUDA and cuDNN
Activate the TF2 environment and install everything
conda activate tf2
pip install [path to cudatoolkit-10.0.130-0.tar.bz2]
pip install [path to cudnn-7.6.0-cuda10.0_0.tar.bz2]- After install CUDA and cuDNN, TF2 can be easily install
pip install tensorflow-gpu==2.0.0b1- If you do not know which version of TF2 you can chose, just type in
pip install tensorflow-gpu==2.0000000And pip will list candidates. This method works well on other python packages.
- Finally you can start your TF2 python and have a test.
import tensorflow as tf- Installation is completed if there is nothing happened. Or you need to install some dependency packages.
- If you want to use the old python, just start it in system command line.
- If you want to use the TF2 python, you need to activate the TF2 conda environment then start python.
- Pycharm has advantages
- Easy to chose python environment
- Quick open
tensorboard(Add tensorboard into external tools. Open tensorboard with external tools.)
- Tensorlayer is easy to use
Tensorlayer is based on tensorflow, it works easily with partial PyTorch syntax.