Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -8,7 +8,6 @@ import torch.optim as optim | ... | @@ -8,7 +8,6 @@ import torch.optim as optim |
| 8 | from torchvision import datasets, transforms | 8 | from torchvision import datasets, transforms |
| 9 | from torch.optim.lr_scheduler import StepLR | 9 | from torch.optim.lr_scheduler import StepLR |
| 10 | 10 | ||
| 11 | - | ||
| 12 | class Net(nn.Module): | 11 | class Net(nn.Module): |
| 13 | def __init__(self): | 12 | def __init__(self): |
| 14 | super(Net, self).__init__() | 13 | super(Net, self).__init__() |
| ... | @@ -114,6 +113,7 @@ def main(): | ... | @@ -114,6 +113,7 @@ def main(): |
| 114 | train_kwargs.update(cuda_kwargs) | 113 | train_kwargs.update(cuda_kwargs) |
| 115 | test_kwargs.update(cuda_kwargs) | 114 | test_kwargs.update(cuda_kwargs) |
| 116 | 115 | ||
| 116 | + # CFMC: Added to fix donwload error | ||
| 117 | datasets.MNIST.resources = [ | 117 | datasets.MNIST.resources = [ |
| 118 | ( | 118 | ( |
| 119 | 'https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz', 'f68b3c2dcbeaaa9fbdd348bbdeb94873'), | 119 | 'https://ossci-datasets.s3.amazonaws.com/mnist/train-images-idx3-ubyte.gz', 'f68b3c2dcbeaaa9fbdd348bbdeb94873'), |
| ... | @@ -122,6 +122,7 @@ def main(): | ... | @@ -122,6 +122,7 @@ def main(): |
| 122 | ('https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz', '9fb629c4189551a2d022fa330f9573f3'), | 122 | ('https://ossci-datasets.s3.amazonaws.com/mnist/t10k-images-idx3-ubyte.gz', '9fb629c4189551a2d022fa330f9573f3'), |
| 123 | ('https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz', 'ec29112dd5afa0611ce80d1b7f02629c') | 123 | ('https://ossci-datasets.s3.amazonaws.com/mnist/t10k-labels-idx1-ubyte.gz', 'ec29112dd5afa0611ce80d1b7f02629c') |
| 124 | ] | 124 | ] |
| 125 | + # End CFMC | ||
| 125 | 126 | ||
| 126 | transform=transforms.Compose([ | 127 | transform=transforms.Compose([ |
| 127 | transforms.ToTensor(), | 128 | transforms.ToTensor(), | ... | ... |
-
Please register or login to post a comment