This commit is contained in:
tianyi 2024-10-16 13:04:33 +08:00
parent 12c35c47a0
commit 3376c8a0d5
1 changed files with 4 additions and 4 deletions

View File

@ -20,10 +20,10 @@ train_dset = torchvision.datasets.CIFAR10(root='./CIFAR10',train=True,download=F
test_dset = torchvision.datasets.CIFAR10(root='./CIFAR10',train=False,download=False,transform=transforms.ToTensor())
train_loader = torch.utils.data.DataLoader(train_dset, batch_size=128, shuffle=True, num_workers=0)
test_loader = torch.utils.data.DataLoader(test_dset, batch_size=128, shuffle=False, num_workers=0)
train_dset.train_data.to(device)
train_dset.train_labels.to(device)
test_dset.test_data.to(device)
test_dset.test_labels.to(device)
train_dset.data.to(device)
train_dset.target.to(device)
test_dset.data.to(device)
test_dset.target.to(device)
#######################################################