train_loader = torch.utils.data.DataLoader(train_set, batch_size=32, shuffle=True, num_workers=0)
self.features = nn.Sequential( nn.Conv2d(3, 48, kernel_size=11, stride=4, padding=2) nn.ReLU(inplace=True), nn.MaxPool2d(kernel_size=3, stride=2), nn.Conv2d(48, 128, kernel_size=5, padding=2), nn.ReLU(inplace=True), nn.MaxPool2d(kernel_size=3, stride=2), nn.Conv2d(128, 192, kernel_size=3, padding=1), nn.ReLU(inplace=True), nn.Conv2d(192, 192, kernel_size=3, padding=1), nn.ReLU(inplace=True), nn.Conv2d(192, 128, kernel_size=3, padding=1), nn.ReLU(inplace=True), nn.MaxPool2d(kernel_size=3, stride=2), )
详细信息可以参考这篇哦~~ transforms.Compose()类详解:串联多个transform操作
最后外加一个今天遇到的关于图片路径的问题:
小白故事多,做为一名新手小白,未来学习道路漫长啊啊啊啊~~~~