Skip to content

Commit d708d06

Browse files
authored
Merge branch 'main' into models/convnext_variants
2 parents fd5c99d + 8aad0e0 commit d708d06

File tree

1 file changed

+2
-1
lines changed
  • torchvision/prototype/datasets/_builtin

1 file changed

+2
-1
lines changed

torchvision/prototype/datasets/_builtin/dtd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def _classify_archive(self, data: Tuple[str, Any]) -> Optional[int]:
7272

7373
def _image_key_fn(self, data: Tuple[str, Any]) -> str:
7474
path = pathlib.Path(data[0])
75-
return str(path.relative_to(path.parents[1]))
75+
# The split files contain hardcoded posix paths for the images, e.g. banded/banded_0001.jpg
76+
return str(path.relative_to(path.parents[1]).as_posix())
7677

7778
def _collate_and_decode_sample(
7879
self,

0 commit comments

Comments
 (0)