PyTorch 的容器 Container 包括 ( nn.ModuleList, nn.ModuleDict, nn.Sequential )
PyTorch几种构建网络的容器类classMyModel1(nn.Module):def__init__(self):super(MyModel,self).__init__()self.conv1=nn.Conv2d(1,6,5)self.pool=nn.MaxPool2d(2,2)self.conv2=nn.Conv2d(6,16,5)self.flatten=nn.Flatten()sel