diff --git a/torchvision/datasets/widerface.py b/torchvision/datasets/widerface.py index 805a9dbec6f..aef9c5ac05c 100644 --- a/torchvision/datasets/widerface.py +++ b/torchvision/datasets/widerface.py @@ -71,7 +71,7 @@ def __init__( if download: self.download() - if not self._check_integrity(): + if download and not self._check_integrity(): raise RuntimeError( "Dataset not found or corrupted. " + "You can use download=True to download and prepare it" )