Thank you for the response but that’s not quite what I’m looking for.
I want to keep the normalization. To do that I have to somehow get back to value ranges that PIL can handle.
I think that I could do it like so:
# load image + normalize
img = Image.open(img_loc)
x_tensor = torch_transforms.ToTensor()(img)
x_tensor = x_tensor / 255
x_tensor = torch_transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])(x_tensor)

# save normalized image
a = x_tensor[0,:,:].min()
b = x_tensor[1,:,:].min()
c = x_tensor[2,:,:].min()
a2 = x_tensor[0,:,:].max()
b2 = x_tensor[1,:,:].max()
c2 = x_tensor[2,:,:].max()
x_tensor[0] = ((x_tensor[0]-a) / (a2 - a)) * 255
x_tensor[1] = ((x_tensor[1]-b) / (b2 - b)) * 255
x_tensor[2] = ((x_tensor[2]-c) / (c2 - c)) * 255
img2 = transforms.ToPILImage()(x_tensor.type(torch.uint8))

Basically, I ‘lift’ each channel to a 0-1 range and map it to the 0-255 values.
However, the resulting image doesn’t look correct. It should look more distorted. I probably have some rather basic error, which is why I was wondering if there is a simpler way of doing the transformation.