1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| from enum import Flag from logging import root from random import shuffle from turtle import down
transform = transforms.Compose( [transforms.ToTensor(), transforms.Normalize((0.5,0.5,0.5), (0.5,0.5,0.5))] )
trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=False, transform=transform) testset = torchvision.datasets.CIFAR10(root='./data', train=False, download=False, transform=transform)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=4, shuffle=True, num_workers=2) testloader = torch.utils.data.DataLoader(testset, batch_size=4, shuffle=False, num_workers=2)
classes = ('plain', 'car', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')
|