Skip to content

Commit 72a8eaa

Browse files
committed
Fix tests
1 parent 88ddbb2 commit 72a8eaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

torchvision/datasets/food101.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import json
22
from pathlib import Path
3-
from typing import Callable, Optional
3+
from typing import Any, Tuple, Callable, Optional
44

55
import PIL.Image
66

@@ -63,7 +63,7 @@ def __init__(
6363
def __len__(self) -> int:
6464
return len(self._image_files)
6565

66-
def __getitem__(self, idx) -> Tuple[PIL.Image.Image, int]:
66+
def __getitem__(self, idx) -> Tuple[Any, Any]:
6767
image_file, label = self._image_files[idx], self._labels[idx]
6868
image = PIL.Image.open(image_file).convert("RGB")
6969

@@ -103,4 +103,4 @@ def _check_exists(self) -> bool:
103103
def _download(self) -> None:
104104
if self._check_exists():
105105
return
106-
download_and_extract_archive(self._URL, download_root=self._base_folder, md5=self._MD5)
106+
download_and_extract_archive(self._URL, download_root=str(self._base_folder), md5=self._MD5)

0 commit comments

Comments
 (0)