Build a torch environment from scratch, nanny-level tutorial, novice Xiaobai, enter! ! !

1. Manage the creation environment, define the name after the name by yourself, here wxy is an example

conda create --name wxy python=3.7.10

2. Activate and enter the environment:

avtivate wxy

3. The installation of the xxx library: After entering the environment, enter: pip install xxx -i Simple Index , the following group of codes are Tsinghua mirror sources, to speed up the installation.

Observe whether torch or tensorflow is required for your own code. Note that when installing torch or tensorflow, you must install the version number corresponding to CUDA.

Take cuda11.1 version as an example

安装tensorflow:pip install tensorflow-gpu==2.4.1 -i https://pypi.tuna.tsinghua.edu.cn/simple

Install torch: pip install torch==1.8.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

4. pip list can check what is installed in your environment.

How to conduct actual combat, please refer to the next blog post: After building your own network, how to build a complete network for actual combat training

Guess you like

Origin blog.csdn.net/weixin_61745097/article/details/125272686