build_imagenet_dataloader#

composer.datasets.build_imagenet_dataloader(datadir, global_batch_size, is_train=True, drop_last=True, shuffle=True, resize_size=- 1, crop_size=224, **dataloader_kwargs)[source]#

Builds an ImageNet dataloader.

Parameters
  • datadir (str) โ€“ path to location of dataset.

  • global_batch_size (int) โ€“ Global batch size.

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

  • drop_last (bool) โ€“ whether to drop last samples. Default: True.

  • shuffle (bool) โ€“ whether to shuffle the dataset. Default: True.

  • resize_size (int, optional) โ€“ The resize size to use. Use -1 to not resize. Default: -1.

  • size (crop) โ€“ The crop size to use. Default: 224.

  • **dataloader_kwargs (Dict[str, Any]) โ€“ Additional settings for the dataloader (e.g. num_workers, etc.)