tfm.vision.preprocess_ops.normalize_image

Normalizes the image to zero mean and unit variance.

If the input image dtype is float, it is expected to either have values in [0, 1) and offset is MEAN_NORM, or have values in [0, 255] and offset is MEAN_RGB.

image A tf.Tensor in either (1) float dtype with values in range [0, 1) or [0, 255], or (2) int type with values in range [0, 255].
offset A tuple of mean values to be subtracted from the image.
scale A tuple of normalization factors.

A normalized image tensor.