PyTorch学习笔记(7)ResNet实战
# Lenet5 网络模型 import torchfrom torch import nnfrom torch.nn import functional as Fclass Lenet5(nn.Module): """ for cifar10 dataset. """ def __init__(self): super(Lenet5, self).__init__() self.conv_unit = nn.Sequential( # x: [b, 3, 32, 32] => [b, 16, ] nn.Conv2d(3,...
more...