View source on GitHub |
Normalizes the image to zero mean and unit variance.
tfm.vision.preprocess_ops.normalize_image(
image: tf.Tensor,
offset: Sequence[float] = tfm.vision.preprocess_ops.MEAN_NORM
,
scale: Sequence[float] = tfm.vision.preprocess_ops.STDDEV_NORM
) -> tf.Tensor
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.
Returns | |
---|---|
A normalized image tensor. |