I think you wouldn’t want this because the transforms occur before the collate function in DataLoader.  Instead, you might want to create a custom collate function.  Below is a quick example
import torch
import torch.utils.data as data
from torch.autograd import Variable

def variable_collate(batch):
    """Puts batch of inputs, labels each into a Variable.
       Args:
         batch: (list) [inputs, labels].  In this simple example, I'm just assuming the input and labels are already Tensor types
       Output:
         minibatch: (Variable)
         targets: (Variable)
    """
    minibatch, targets = zip(*[(a, b) for (a,b) in batch])
    minibatch, targets = torch.stack(minibatch, dim=0), torch.stack(targets, dim=0)
    minibatch, targets = Variable(minibatch), Variable(targets)
    return minibatch, targets
    
X = torch.arange(0, 10).view(-1, 2)
Y = torch.zeros(5).view(-1, 1)

ds = data.TensorDataset(X, Y)
dl = data.DataLoader(ds, batch_size=1, collate_fn=variable_collate)

for mb, tgts in dl:
    print(mb, tgts)