Pytorch Tutorial
Pytorch Tutorial
and
Pytorch Tutorial
Outline
GPU drivers
CUDA
cuDNN
Virtual Environment
GPU drivers
軟體目錄下新增ppa地址,然後更新資料庫資訊
利用ppa來管理GPU driver’s version
安裝前必須先關閉桌面環境 lightdm
$ cat /proc/driver/nvidia/version
nvidia-smi
下載 CUDA 10.0
https://developer.nvidia.com/cuda-10.0-download-archive
安裝前必須先關閉桌面環境 lightdm
$ sudo service lightdm stop
接著安裝CUDA
$ sudo sh cuda_10.0.130_410.48_linux.run
下載 CUDA 10.0
export CUDA_HOME=/usr/local/cuda
export CUDA_ROOT=$CUDA_HOME
export CUDA_INC_DIR=$CUDA_HOME/include/
export LD_LIBRARY_PATH=${CUDA_HOME}/lib64
PATH=${CUDA_HOME}/bin:${PATH}
export PATH
下載 CUDA 10.0
https://developer.nvidia.com/rdp/cudnn-download
Install cuDNN
CIFAR 10 classification
10 classes: airplane, automobile, bird, cat, deer, dog, frog, horse, ship, truck
The images are 3x32x32
Train an image classifier
Implementation steps
1. Load and normalizing the CIFAR 10 training and test datasets using
torchvision
2. Define a Convolutional Neural Network
3. Define a loss function
4. Train the network on the training data
5. Test the network on the test data
Loading data