You can vectorize this for faster processing using
mean = torch.tensor(mean)[None, :, None, None] # assuming mean is 3 values for 3 channels, 
# convert it into shape (1, 3, 1, 1) for broadcasting, similarly
std = torch.tensor(std)[None, :, None, None]
# and then you can do normalization using
data = (data - mean) / (std + 1e-11)