build_synthetic_ade20k_dataloader#

composer.datasets.build_synthetic_ade20k_dataloader(batch_size, *, split='train', drop_last=True, shuffle=True, final_size=512, num_unique_samples=100, device='cpu', memory_format=MemoryFormat.CONTIGUOUS_FORMAT, **dataloader_kwargs)[source]#

Builds a synthetic ADE20k dataloader.

Parameters
  • batch_size (int) โ€“ Batch size per device.

  • split (str) โ€“ the dataset split to use either โ€˜trainโ€™, โ€˜valโ€™, or โ€˜testโ€™. Default: 'train`.

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

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

  • final_size (int) โ€“ the final size of the image and target. Default: 512.

  • num_unique_samples (int) โ€“ number of unique samples in synthetic dataset. Default: 100.

  • device (str) โ€“ device with which to load the dataset. Default: cpu.

  • memory_format (MemoryFormat) โ€“ memory format of the tensors. Default: CONTIGUOUS_FORMAT.

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