[PyTorch] MNIST Introduction
MNIST : 손글씨 숫자 분류. 이미지 크기는 28*28임. import torch import torchvision.datasets as dsets import torchvision.transforms as transforms import random import matplotlib.pyplot as plt device = 'cuda' if torch.cuda.get_device_name('cuda') else 'cpu' random.seed(777) torch.manual_seed(777) if device == 'cuda': torch.cuda.manual_seed(777) # parameters 설정 epochs = 15 batch_size = 100 # torchvision.datasets 에..