1
1
import csv
2
2
import os
3
- import warnings
4
3
from collections import namedtuple
5
4
from typing import Any , Callable , List , Optional , Union , Tuple
6
5
@@ -36,12 +35,11 @@ class CelebA(VisionDataset):
36
35
and returns a transformed version. E.g, ``transforms.PILToTensor``
37
36
target_transform (callable, optional): A function/transform that takes in the
38
37
target and transforms it.
39
- download (bool, optional): Deprecated .
38
+ download (bool, optional): Unsupported .
40
39
41
40
.. warning::
42
41
43
- Downloading CelebA is not supported anymore as of 0.13 and this
44
- parameter will be removed in 0.15. See
42
+ Downloading CelebA is not supported anymore as of 0.13. See
45
43
`this issue <https://github.com/pytorch/vision/issues/5705>`__
46
44
for more details.
47
45
Please download the files from
@@ -73,7 +71,7 @@ def __init__(
73
71
target_type : Union [List [str ], str ] = "attr" ,
74
72
transform : Optional [Callable ] = None ,
75
73
target_transform : Optional [Callable ] = None ,
76
- download : bool = None ,
74
+ download : bool = False ,
77
75
) -> None :
78
76
super ().__init__ (root , transform = transform , target_transform = target_transform )
79
77
self .split = split
@@ -85,15 +83,6 @@ def __init__(
85
83
if not self .target_type and self .target_transform is not None :
86
84
raise RuntimeError ("target_transform is specified but target_type is empty" )
87
85
88
- if download is not None :
89
- warnings .warn (
90
- "Downloading CelebA is not supported anymore as of 0.13, and the "
91
- "download parameter will be removed in 0.15. See "
92
- "https://github.com/pytorch/vision/issues/5705 for more details. "
93
- "Please download the files from "
94
- "https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html and extract them "
95
- "in ``root/celeba``."
96
- )
97
86
if download :
98
87
self .download ()
99
88
@@ -165,8 +154,7 @@ def download(self) -> None:
165
154
return
166
155
167
156
raise ValueError (
168
- "Downloading CelebA is not supported anymore as of 0.13, and the "
169
- "download parameter will be removed in 0.15. See "
157
+ "Downloading CelebA is not supported anymore as of 0.13. See "
170
158
"https://github.com/pytorch/vision/issues/5705 for more details. "
171
159
"Please download the files from "
172
160
"https://mmlab.ie.cuhk.edu.hk/projects/CelebA.html and extract them "
0 commit comments