Add new Dataloader

VISSL currently supports PyTorch torch.utils.data.DataLoader. If users would like to add a custom dataloader of their own, we recommend the following steps.

  • Step1: Create your custom dataloader class MyNewDataLoader in vissl/data/my_loader.py. The Dataloader should implement all the variables and member that PyTorch Dataloader uses.

  • Step2: Import your new MyNewDataLoader in vissl/data/__init__.py and extend the function get_loader(...) to use your MyNewDataLoader. To control this from configuration file, we recommend users to add some config file options in vissl/defaults.yaml file under DATA.TRAIN.dataloader_name.

We welcome PRs following our Contributing guidelines.