#1 jiazai biyao de ku
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets,transforms
#dingyi chaocanshu
BATCH_SIZE=16
DEVICE=torch.device("cuda" if torch.cuda.is_available() else "cpu")
EPOCHS=10
#goujian pipline
pipline=transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.1307,),(0.3081,))
])
#4 xiazai jiazai shuju
from torch.utils.data import DataLoader
train_set= not datasets.MNIST("data",train=True,download=True,transform=pipline)
test_set=datasets.MINST("data",train=False,download=True,transform=pipline)
train_load=DataLoader(train_set,batch_size=BATCH_SIZE,shuffle=True)
test_loader=DataLoader(test_set,batch_size=BATCH_SIZE,shuffle=True)