Spaces:
Running
Running
Update pages/1_TensorIntro.py
Browse files- 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)
|
| 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 |
},
|