Hy, I guess what you’re asking for is how to load your own dataset into dataloader. One way to do this is using TensorDataset.

from torch.utils.data import DataLoader , TensorDataset
dataset = TensorDataset(X , y)
trainloader = DataLoader(dataset , batch_size = 16, shuffle=True)