If the structure of your data is equal to what ImageFolder expects (i.e. samples for classes are located in their corresponding folder), you could use torchvision.datasets.DatasetFolder and define a custom loader method, which could be as simple as lambda path: torch.load(path). You can check the default loaders here.
If that’s not the case and your data is located in a single folder, you could write a custom Dataset instead as described here 1.