一、pytorch简介
1、与TensorFlow区别
 
 2、常用网络层
 
二、pytorch需要:
1、anaconda
 2、CUDA 只能在NVIDIA上运行
 ↓我发现电脑果然没有这个显卡
 https://zhidao.baidu.com/question/2084255692200398828.html
 3、pycharm
 新项目要配置python的编译器:
 
 
 
- 安装CPU版本的pytorch

在此之前我安装了anaconda3
 
 里面的Python版本
 
 参考
 https://blog.csdn.net/Bluebro/article/details/127161165
- 创建虚拟环境
 
conda create -n pytorch python=3.9
 

 2. 激活虚拟幻境
 
 
- 下载pytorch(CPU版本)

设置镜像安装https://blog.csdn.net/Redamancy06/article/details/125820669
直接在(pytorch)里面复制这两句
清华源 
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
 
中科大源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes
 
再复制官网上面的命令,去掉-c pytorch
 4. python ,import torch,torch.version
 
- 把pytorch应用到pycharm中
中途出现了no model named ‘torch’
解决:https://blog.csdn.net/qq_39237205/article/details/121056658




 



















