ImagenetDatasetHparams

class composer.datasets.ImagenetDatasetHparams(resize_size: int, crop_size: int, is_train: bool, datadir: str, drop_last: bool = True, shuffle: bool = True)[source]

Bases: composer.datasets.hparams.DatasetHparams

Defines an instance of the ImageNet dataset for image classification.

Parameters
  • resize_size (int) – The resize size to use.

  • size (crop) – The crop size to use.

  • is_train (bool) – Whether to load the training or validation dataset.

  • datadir (str) – Data directory to use.

  • drop_last (bool) – Whether to drop the last samples for the last batch.

  • shuffle (bool) – Whether to shuffle the dataset for each epoch.

initialize_object() DataloaderSpec[source]

Initializes a DataloaderSpec for this dataset.