eaglelandsonce commited on
Commit
a761b67
1 Parent(s): 3494d39

Update pages/1_TensorIntro.py

Browse files
Files changed (1) hide show
  1. pages/1_TensorIntro.py +1 -2
pages/1_TensorIntro.py CHANGED
@@ -213,7 +213,7 @@ import torchvision.transforms as transforms
213
  # Define the transformation for the dataset
214
  transform = transforms.Compose(
215
  [transforms.ToTensor(),
216
- transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))])
217
 
218
  # Load the CIFAR-10 dataset
219
  trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform)
@@ -282,7 +282,6 @@ with torch.no_grad():
282
  correct += (predicted == labels).sum().item()
283
 
284
  print(f'Accuracy of the network on the 10000 test images: {100 * correct / total}%')
285
-
286
 
287
  '''
288
  },
 
213
  # Define the transformation for the dataset
214
  transform = transforms.Compose(
215
  [transforms.ToTensor(),
216
+ transforms.Normalize((0.5, 0.5, 0.5))])
217
 
218
  # Load the CIFAR-10 dataset
219
  trainset = torchvision.datasets.CIFAR10(root='./data', train=True, download=True, transform=transform)
 
282
  correct += (predicted == labels).sum().item()
283
 
284
  print(f'Accuracy of the network on the 10000 test images: {100 * correct / total}%')
 
285
 
286
  '''
287
  },