build_ffcv_imagenet_dataloader#

composer.datasets.build_ffcv_imagenet_dataloader(datadir, global_batch_size, is_train=True, resize_size=- 1, crop_size=224, cpu_only=False, drop_last=True, prefetch_factor=2, num_workers=8)[source]#

Builds an FFCV 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.

  • 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.

  • cpu_only (int) โ€“ Only perform transforms on โ€˜cpuโ€™. Default: False.

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

  • prefetch_factor (int) โ€“ Number of batches to prefect. Default: 2.

  • num_workers (int) โ€“ Number of workers. Default: 8.