cerebras.modelzoo.data.vision.classification.data.dsprites.DSprites#

class cerebras.modelzoo.data.vision.classification.data.dsprites.DSprites[source]#

Bases: torchvision.datasets.vision.VisionDataset

dSprites is a dataset of 2D shapes procedurally generated from 6 ground truth independent latent factors. These factors are color, shape, scale, rotation, x and y positions of a sprite.

All possible combinations of these latents are present exactly once, generating N = 737280 total images.

### Latent factor values * Color: white * Shape: square, ellipse, heart * Scale: 6 values linearly spaced in [0.5, 1] * Orientation: 40 values in [0, 2 pi] * Position X: 32 values in [0, 1] * Position Y: 32 values in [0, 1]

We varied one latent at a time (starting from Position Y, then Position X, etc), and sequentially stored the images in fixed order. Hence the order along the first dimension is fixed and allows you to map back to the value of the latents corresponding to that image.

We chose the latents values deliberately to have the smallest step changes while ensuring that all pixel outputs were different. No noise was added.

Methods

__init__(root, transform=None, target_transform=None)[source]#
__call__(*args: Any, **kwargs: Any) Any#

Call self as a function.

static __new__(cls, *args: Any, **kwargs: Any) Any#