simet.providers.cifar¶
simet.providers.cifar ¶
CIFARProvider ¶
CIFARProvider(data_path)
Bases: Provider
Provider that exposes the CIFAR-10 training split via VisionDataset.
Wraps torchvision.datasets.CIFAR10 with train=True, download=True, and
applies the project Transform. Data will be downloaded (if missing) into
self.data_path.
Notes
- This provider is fixed to the training split (
train=True). If you need the test/validation split, create a separate provider or make the split configurable. - The given
Transformshould handle any normalization/augmentation appropriate for CIFAR-10 (e.g., mean/std, random crops/flips).
Example
provider = CIFARProvider(data_path=Path("./data/cifar10")) ds = provider.get_data(transform=SomeTransform()) len(ds) # 50,000 images in the training split 50000
Source code in simet/providers/base/provider.py
46 47 | |
get_data ¶
get_data(transform)
Return the CIFAR-10 training dataset with the provided transform.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
transform
|
Transform
|
Project transform wrapper; |
required |
Returns:
| Name | Type | Description |
|---|---|---|
VisionDataset |
VisionDataset
|
A CIFAR-10 training dataset ready for a |
Source code in simet/providers/cifar.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | |