1 PyTorch生态
2 PyTorch能干什么
- GPU加速
- 自动求导
- 常用网络层:
nn.Linear
nn. Conv2d
nn. LSTM
nn. ReLu
nn Sigmoid
nn. Softmax
nn crossentropyLoss
nn.MSE
3 PyTorch的开发环境安装
前提: 拥有anaconda
以下操作均在命令行:
1、在conda下安装一个叫deeplearning的虚拟环境
conda create -n deeplearning python=3.6 numpy matplotlib pandas jupyter notebook
2、使这个环境生效
source activate deeplearning
3、安装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 --set show_channel_urls yes
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda install pytorch torchvision torchaudio