--- pretty_name: "CIFAR10 with leftover data for calibration" license: mit language: en task_categories: ["image-classification"] size_categories: 100K/.zip`. Each `.zip` is a flat archive containing the associated images `XXXX.png`. **For a given class**, every filename `XXXX.png` is unique, with `XXXX` ranging: - from `"0000"` to `"0999"` for test samples, - from `"1000"` to `"1099"` for calibration samples, - from `"1100"` to `"5999"` for train samples. # Use with PyTorch As a helper, you can use the following snippet to iterate through a specific split: ```python from datasets import load_dataset from torch.utils.data import DataLoader dataset = load_dataset("ego-thales/cifar10", name="no_bird_calibration") dataset = dataset["unique_split"] # Comment out if you're in case 1. below dataloader = DataLoader(dataset.with_format("torch"), batch_size=300) for batch in dataloader: # batch["images"]: tensor with shape `(300, 3, 32, 32)` (`torch.uint8` values between 0 and 255) # batch["label"]: tensor with shape `(300,)` (`torch.int64` values between 0 and 9) # batch["classname"]: list of length `300` with classnames as `str` ``` ## Loading arguments While [this question](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdownload-only-requested-split%2F165968%2F3%3Fu%3Dego-thales) does not find a reasonable answer, there are two cases to consider. #### 1. If you wish to download the full dataset - `name` (Optional): Either `"complete"` or `"no_"`. - `split` (Optional): One of `"train"`, `"calibration"` or `"test"`. If `name` is of the format `"no_"`, then the following values are also allowed: `"left_out_train"`, `"left_out_calibration"`, `"left_out_test"` and `"left_out"` (for all left-out samples). #### 2. If you wish to only use a single split Since apparently `streaming=True` still goes through every archive to find metadata no matter the setting, as a workaround, we defined many different configuration to act as splits. So use: - `name`: One of `"_"` or `"no__"` with `` either `"train"`, `"calibration"` or `"test"`. - `split`: Leave empty. ## Good to know The `.zip` archives are unzipped at every iteration where they are needed. As such, we recommend using an adapted `batch_size`, accounting for the number of samples in each `data.zip`.