If you have a PIL.Image, you could do the following:
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
                                 std=[0.229, 0.224, 0.225])

transform=  transforms.Compose([
    transforms.ToTensor(),
    normalize,
])

In that way, you don’t have to normalize the data yourself.