(self, root: Union[str, Path], split: str = "train", **kwargs: Any)
| 50 | """ |
| 51 | |
| 52 | def __init__(self, root: Union[str, Path], split: str = "train", **kwargs: Any) -> None: |
| 53 | root = self.root = os.path.expanduser(root) |
| 54 | self.split = verify_str_arg(split, "split", ("train", "val")) |
| 55 | |
| 56 | self.parse_archives() |
| 57 | wnid_to_classes = load_meta_file(self.root)[0] |
| 58 | |
| 59 | super().__init__(self.split_folder, **kwargs) |
| 60 | self.root = root |
| 61 | |
| 62 | self.wnids = self.classes |
| 63 | self.wnid_to_idx = self.class_to_idx |
| 64 | self.classes = [wnid_to_classes[wnid] for wnid in self.wnids] |
| 65 | self.class_to_idx = {cls: idx for idx, clss in enumerate(self.classes) for cls in clss} |
| 66 | |
| 67 | def parse_archives(self) -> None: |
| 68 | if not check_integrity(os.path.join(self.root, META_FILE)): |
nothing calls this directly
no test coverage detected