From 3376c8a0d55ab344ff755354ba4d28077d7caca2 Mon Sep 17 00:00:00 2001 From: tianyi Date: Wed, 16 Oct 2024 13:04:33 +0800 Subject: [PATCH] fix --- CIFAR10_playground.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CIFAR10_playground.py b/CIFAR10_playground.py index ef8c6f1..c725731 100755 --- a/CIFAR10_playground.py +++ b/CIFAR10_playground.py @@ -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) #######################################################