File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
torchvision/prototype/datasets/_builtin Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ def _make_datapipe(
129129 return Mapper (dp , self ._collate_and_decode_sample , fn_kwargs = dict (decoder = decoder ))
130130
131131 def _filter_images (self , data : Tuple [str , Any ]) -> bool :
132- return self ._classify_archive (data ) == 2
132+ return self ._classify_archive (data ) == DTDDemux . IMAGES
133133
134134 def _generate_categories (self , root : pathlib .Path ) -> List [str ]:
135135 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(
141141 return Mapper (dp , functools .partial (self ._collate_and_decode_sample , decoder = decoder ))
142142
143143 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
145145
146146 def _generate_categories (self , root : pathlib .Path ) -> List [str ]:
147147 config = self .default_config
You can’t perform that action at this time.
0 commit comments