mnist_hparams#

MNIST image classification dataset hyperparameters.

The MNIST dataset is a collection of labeled 28x28 black and white images of handwritten examples of the numbers 0-9. See the wikipedia entry for more details.

Hparams

These classes are used with yahp for YAML-based configuration.

MNISTDatasetHparams

Defines an instance of the MNIST dataset for image classification.

class composer.datasets.mnist_hparams.MNISTDatasetHparams(use_synthetic=False, synthetic_num_unique_samples=100, synthetic_device='cpu', synthetic_memory_format=MemoryFormat.CONTIGUOUS_FORMAT, drop_last=True, shuffle=True, download=True, is_train=True, datadir=None)[source]#

Bases: composer.datasets.dataset_hparams.DatasetHparams, composer.datasets.synthetic_hparams.SyntheticHparamsMixin

Defines an instance of the MNIST dataset for image classification.

Parameters
  • download (bool, optional) โ€“ Whether to download the dataset, if needed. Default: True.

  • datadir (str) โ€“ The path to the data directory.

  • is_train (bool) โ€“ Whether to load the training data or validation data. Default: True.