深度学习实战(一):LeNet实现CIFAR-10图像分类
构建模型:import torch.nn as nnimport torch.nn.functional as Fclass LeNet(nn.Module): def __init__(self): super(LeNet, self).__init__() self.conv1 = nn.Conv2d(3, 16, 5)#Convd(输入层的channel,卷积核个数,卷积核大小) self.pool1 = nn.MaxPool2d(2,