MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

ML/src/python/neuralforge/data/dataset.py:10–24  ·  view source on GitHub ↗
(
        self,
        root: str,
        transform: Optional[Callable] = None,
        target_transform: Optional[Callable] = None,
        split: str = 'train'
    )

Source from the content-addressed store, hash-verified

8
9class ImageDataset(Dataset):
10 def __init__(
11 self,
12 root: str,
13 transform: Optional[Callable] = None,
14 target_transform: Optional[Callable] = None,
15 split: str = 'train'
16 ):
17 self.root = root
18 self.transform = transform
19 self.target_transform = target_transform
20 self.split = split
21
22 self.samples = []
23 self.class_to_idx = {}
24 self._load_dataset()
25
26 def _load_dataset(self):
27 split_dir = os.path.join(self.root, self.split)

Callers

nothing calls this directly

Calls 1

_load_datasetMethod · 0.95

Tested by

no test coverage detected