Sorry, I might have misunderstood your code, as it also runs fine of my machine.
Could you check the PyTorch and torchvision versions you are using in Colab?
Just for the sake of debugging, could you use this transform and see if it’s working?
img_out = transforms.Normalize(mean=torch.tensor([-1., -1., -1.], device='cuda'),
                               std=torch.tensor([2., 2., 2.], device='cuda'))(img_out)