I never did this kind of loading are you trying to do…
The thing is the data loader creates a iterator then you must iterate on it …
for data_x, data_y in dataloader:
    pass

Take a look on this tutorial 26 how to create a Dataset Class and use that to wrap your data.
It must implement the following methods :
class CustomDataset(Dataset):
    def __init__(self):
        """ load your data here """
        pass

    def __len__(self):
        """ return the number of observation here """
        pass

    def __getitem__(self, index):
        """ receives a index / range here and returns accordingly """
        pass
  

Then you create a instance of the dataset and pass it to the your dataloader.