File tree 2 files changed +2
-2
lines changed
torchvision/prototype/datasets/_builtin 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def _make_datapipe(
129
129
return Mapper (dp , self ._collate_and_decode_sample , fn_kwargs = dict (decoder = decoder ))
130
130
131
131
def _filter_images (self , data : Tuple [str , Any ]) -> bool :
132
- return self ._classify_archive (data ) == 2
132
+ return self ._classify_archive (data ) == DTDDemux . IMAGES
133
133
134
134
def _generate_categories (self , root : pathlib .Path ) -> List [str ]:
135
135
dp = self .resources (self .default_config )[0 ].load (pathlib .Path (root ) / self .name )
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ def _make_datapipe(
141
141
return Mapper (dp , functools .partial (self ._collate_and_decode_sample , decoder = decoder ))
142
142
143
143
def _filter_split_and_classification_anns (self , data : Tuple [str , Any ]) -> bool :
144
- return self ._classify_anns (data ) == 0
144
+ return self ._classify_anns (data ) == OxfordIITPetDemux . SPLIT_AND_CLASSIFICATION
145
145
146
146
def _generate_categories (self , root : pathlib .Path ) -> List [str ]:
147
147
config = self .default_config
You can’t perform that action at this time.
0 commit comments