Install tensorflow-gpu and tensorflow_federated


Install CUDA and cuDNN before installing tensorflow-gpu. For specific installation steps, please refer to the previous article: Record the process of correctly installing CUDA and cuDNN on Win10 (record some pitfalls)

Install tensorflow-gpu

The CUDA version installed on my computer is 10.2, and the cuDNN version is 7.6.5. According to the comparison table on the TensorFlow official website:

tensorflow-gpu 2.1.0, 2.2.0, 2.3 . 0 can be installed, it is recommended to install the lower version 2.1.0 here, but I installed 2.3.0.

Enter Anaconda Prompt, enter:

pip install tensorflow-gpu==2.3.0 -i

The installation was successful!

Install tensorflow_federated

Go to GitHub to view the version correspondence between tensorflow and tensorflow_federated:

Install version 0.17.0 here:

pip install tensorflow_federated==0.17.0 -i

It is worth noting that In the process of installing tensorflow_federated, the cpu version of tensorflow will be automatically installed, and the version of tensorflow automatically installed when tensorflow_federated 0.17.0 is installed is 2.3.4, then in the environment at this time The CPU version and GPU version of tensorflow exist at the same time, as shown below:

If Both the CPU version and the GPU version are installed in the environment, and the GPU version runs by default.

Leave a Reply

Your email address will not be published. Required fields are marked *