最近在学习pytorch,手工复现了LeNet网络,并附源码如下,欢迎大家留言交流 import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms class LeNet(nn.Module): def __init__(self): super(LeNet,self).__init__() self.conv1 = nn.Conv2d(1