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