Does using the transform in here:
dl = DataLoader(
  torchvision.datasets.MNIST('/data/mnist', train=True, download=True,
                             transform=torchvision.transforms.Compose([
                               torchvision.transforms.ToTensor(),
                               torchvision.transforms.Normalize((0.5,), (0.5,)),
                               torchvision.transforms.LinearTransformation(trans)  
                             ])), shuffle=False)

really has any sense?
Try the example and you will see nothing will be transformed. Am I missing something obvious?