1.对LeNet-5的改进
将kernel_size=5的卷积层变为两层kernel_size=3的卷积层,并加入batch_normalization,具体实现如下:
self.conv1=nn.Sequential(nn.Conv2d(in_channels=1,out_channels=6,kernel_size=3),
nn.Conv2d(in_channels=6,out_channels=6,kernel_size=3),
nn.BatchNorm2d(6))
self.conv2=nn.Sequential(nn.Conv2d(in_channels=6,out_channels=16,kernel_size=3),
nn.Conv2d(in_channels=16,out_channels=16,kernel_size=3)