Currently you are randomly normalizing the data. Are you sure you would like to apply it randomly?
If image and mask are single channel images, you should pass the mean and std as:
image = TF.normalize(image, (0.34, ), (0.27, ), inplace=False)

Also, if you are working on a segmentation use case, the mask shouldn’t be normalized, since this will corrupt your class labels.