kaira.data.load_sample_images
- kaira.data.load_sample_images(dataset: Literal['cifar10', 'cifar100', 'mnist'] = 'cifar10', num_samples: int = 4, seed: int | None = None, normalize: bool = False) Tuple[Tensor, Tensor][source]
Load sample images from popular datasets for demonstrations.
This function provides easy access to sample images from standard datasets like CIFAR-10, CIFAR-100, and MNIST for demonstration purposes.
- Parameters:
dataset – Name of the dataset to sample from (‘cifar10’, ‘cifar100’, ‘mnist’)
num_samples – Number of sample images to return
seed – Random seed for reproducibility
normalize – Whether to normalize the images to [0,1] range
- Returns:
Tensor of images with shape (num_samples, C, H, W)
Tensor of labels with shape (num_samples,)
- Return type:
Tuple containing