As colesbury said, you can do it. You can build your own data loader using the torch.utils.data.Dataset class. You can change the getitem and add your own data transformation using Numpy or any other library. You have more information of how to do it here:
https://pytorch.org/tutorials/beginner/data_loading_tutorial.html#dataset-class 3