Skip to content

Commit 42b95fe

Browse files
authored
Update GANsImagesMNST.py
1 parent 071ec93 commit 42b95fe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

handCode/GANsImagesMNST.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
def mnist_data():
22
compose = transforms.Compose(
3+
34
[transforms.ToTensor(),
5+
46
transforms.Normalize((.5, .5, .5), (.5, .5, .5))
7+
58
])
69
out_dir = './dataset'
710
return datasets.MNIST(root=out_dir, train=True, transform=compose, download=True)
@@ -12,4 +15,4 @@ def mnist_data():
1215
# Create loader with data, so that we can iterate over it
1316
data_loader = torch.utils.data.DataLoader(data, batch_size=100, shuffle=True)
1417
# Num batches
15-
num_batches = len(data_loader)
18+
num_batches = len(data_loader)

0 commit comments

Comments
 (0)