1. 所实现的模型结构
2.代码展示
import torchvision.datasets
from torchvision import transforms
from torch.utils.data import DataLoader
import torch.nn.functional as F
from torch.utils.tensorboard import SummaryWriter
writer = SummaryWriter(log_dir='../LEDR')
trans = transforms.Compose([transforms.ToTensor(),transforms.Normalize((0.1307,),(0.3801,))])
train_set = torchvision.datasets.MNIST(root='E:\learn_pytorch\LE',train=True,transform=trans,download=True)
test_set = torchvision.datasets.MNIST(root='E:\learn_pytorch\LE',train=False,transform=trans,download=True)
train_data = DataLoader(dataset=train_set,batch_size=64,shuffle=True)
test_data = DataLoader(dataset=test_set,batch_size=64,shuf