[PyTorch] MNIST with Batch Normalization
Batch Normalization dropout과 동일하게 model.train( ), model.eval( ) 사용해야 함. import torch import torchvision.datasets as dsets import torchvision.transforms as transforms device = 'cuda' if torch.cuda.is_available() else 'cpu' mnist_train = dsets.MNIST(root='MNIST_data/', train=True, download=True, transform=transforms.ToTensor()) mnist_test = dsets.MNIST(root='MNIST_data/', train=True, download=True..