From add28091c206dc10724a978025625095e412faa7 Mon Sep 17 00:00:00 2001 From: Philip Meier Date: Tue, 2 Mar 2021 13:05:38 +0100 Subject: [PATCH] remove imprecise error handling in PhotoTour dataset --- torchvision/datasets/phototour.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/torchvision/datasets/phototour.py b/torchvision/datasets/phototour.py index 2b657b8bfb6..7c37e37779d 100644 --- a/torchvision/datasets/phototour.py +++ b/torchvision/datasets/phototour.py @@ -92,10 +92,7 @@ def __init__( self.download() if not self._check_datafile_exists(): - try: - self.cache() - except Exception as error: - raise RuntimeError("Dataset not found. You can use download=True to download it") from error + self.cache() # load the serialized data self.data, self.labels, self.matches = torch.load(self.data_file)