Solved by yvanscher in post #3 
              
              
                Would this do it? 
import torch
from torchvision import transforms

mu = 2
std = 0.5
t = torch.Tensor([1,2,3])
(t - 2)/0.5
# or if t is an image
transforms.Normalize(2, 0.5)(t)

see: 
https://pytorch.org/docs/master/torchvision/transforms.html#torchvision.transforms.Normalize