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
MyNewDataLoaderinvissl/data/my_loader.py. The Dataloader should implement all the variables and member that PyTorch Dataloader uses.Step2: Import your new
MyNewDataLoaderinvissl/data/__init__.pyand extend the functionget_loader(...)to use yourMyNewDataLoader. To control this from configuration file, we recommend users to add some config file options invissl/defaults.yamlfile underDATA.TRAIN.dataloader_name.
We welcome PRs following our Contributing guidelines.