illustrate
In fact, the whole is quite simple. The difference between GPU and CPU is that you need to install cuda and cudnn first; when installing cuda, you need to determine what version of cuda you need to install on your graphics card; when installing pytorch, you need to make sure that your cuda is installed. What version is it, and then select the corresponding pytorch version, if pytorch does not have a corresponding cuda version, then you will uninstall cuda
It is recommended not to install the latest version of each software, so that other software may not have the corresponding version
personal environment
System: windows10
Graphics card: 3090
cuda: 11.1
hidden: 8.2.2
pytorch: 1.8.0
tensorflow: 2.5.0
Install CUDA
download link:
new:
https://developer.nvidia.com/cuda-downloads
Old version:
https://developer.nvidia.com/cuda-toolkit-archive
reference:
https://zhuanlan.zhihu.com/p/94220564?utm_source=wechat_session
Check the installed cuda version:
If cuda is not installed, it will display
Make complaints:
When viewing the installed cuda version, some blogs show that this method is used to view the cuda version (NVIDIA control panel, lower left system information, components).
What a pit! This position shows the highest cuda version supported by the current graphics card, not the installed cuda version. I thought cuda was installed. I started to press pytorch, and finally reported an error, missing the cudatoolkit package.
Install pytorch
Install tensorflow
install opencv
reference:
https://mp.csdn.net/mp_blog/creation/editor/111470521
There is nothing difficult about this position, but the version is different, so you must choose the version according to the actual situation
I really didn’t encounter any problems during the installation, so I have nothing to write about. I used anaconda to create a virtual environment python3.6, and installed the pytorch package and tensorflow package in this environment. The reason why I installed tensorflow is mainly Because using tensorboard