We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 253b5f1 commit 624eb63Copy full SHA for 624eb63
examples/super_resolution/main.py
@@ -73,8 +73,12 @@ def __len__(self):
73
return len(self.dataset)
74
75
76
-trainset = torchvision.datasets.Caltech101(root="./data", download=True)
77
-testset = torchvision.datasets.Caltech101(root="./data", download=False)
+try:
+ trainset = torchvision.datasets.Caltech101(root="./data", download=True)
78
+ testset = torchvision.datasets.Caltech101(root="./data", download=False)
79
+except RuntimeError:
80
+ print("Dataset download problem, exiting without error code")
81
+ exit(0)
82
83
trainset_sr = SRDataset(trainset, scale_factor=opt.upscale_factor, crop_size=opt.crop_size)
84
testset_sr = SRDataset(testset, scale_factor=opt.upscale_factor, crop_size=opt.crop_size)
0 commit comments