__key__
stringclasses
1 value
__url__
stringclasses
1 value
meta
unknown
cinic-10-batches-py/batches
/tmp/hf-datasets-cache/medium/datasets/98270841691388-config-parquet-and-info-alexey-zhavoronkin-CINIC1-d9fcf128/downloads/7db3f77dd621945547e5447f6e8f476c5c62df9501fa3970353d8f3572ec390a
[ 128, 4, 149, 102, 0, 0, 0, 0, 0, 0, 0, 125, 148, 140, 11, 108, 97, 98, 101, 108, 95, 110, 97, 109, 101, 115, 148, 93, 148, 40, 140, 8, 97, 105, 114, 112, 108, 97, 110, 101, 148, 140, 10, 97, 117, 116, 111, 109, 111, 98, 105, 108, 101, 148, 140, 4, 98, 105, 114, 100, 148, 140, 3, 99, 97, 116, 148, 140, 4, 100, 101, 101, 114, 148, 140, 3, 100, 111, 103, 148, 140, 4, 102, 114, 111, 103, 148, 140, 5, 104, 111, 114, 115, 101, 148, 140, 4, 115, 104, 105, 112, 148, 140, 5, 116, 114, 117, 99, 107, 148, 101, 115, 46 ]

CINIC10 dataset with interface of CIFAR10.

It is faster than the common CINIC10 due to the fact that all images are loaded into RAM while initing dataset instance.

You should save cinic10.py from this repo in local directory. And then import the CINIC10 class from it:

import torchvision
import torch
from torchvision transforms
from cinic10 import CINIC10

data_mean = [0.47889522, 0.47227842, 0.43047404]
data_std = [0.24205776, 0.23828046, 0.25874835]

transform_train = transforms.Compose([
    transforms.RandomCrop(32, padding=4),
    transforms.Resize(32),
    transforms.RandomHorizontalFlip(),
    transforms.ToTensor(),
    transforms.Normalize(data_mean, data_std),
])

transform_test = transforms.Compose([
    transforms.Resize(32),
    transforms.ToTensor(),
    transforms.Normalize(data_mean, data_std),
])

batch_size = 64
num_workers = 4

trainset = CINIC10(root='./data', train=True, download=True, transform=transform_train)
trainloader = torch.utils.data.DataLoader(trainset, batch_size=batch_size, shuffle=True, num_workers=num_workers)

testset = CINIC10(root='./data', train=False, download=True, transform=transform_test)
testloader = torch.utils.data.DataLoader(testset, batch_size=batch_size, shuffle=False, num_workers=num_workers)
Downloads last month
48
Edit dataset card