If I understood your question correctly, then the answer would be: by simply returning x[n] and y[n] from your Dataset class. Something like the following:
import torch

class Dataset(torch.nn.Module):
    def __init__(self):
        super().__init__()
    def __len__(self):
        return 10
    def __getitem__(self, ind):
        inputs = torch.rand(2)
        labels = torch.rand(2)
        return inputs, labels

dataset = Dataset()
data_loader = torch.utils.data.DataLoader(dataset, batch_size=2)
for inputs, labels in data_loader:
    print("Inputs: ", inputs)
    print("Labels: ", labels)