I'm curious about any preference of using tf.keras.utils.normalize
vs the way we usually normalize a series, subtracting mean and dividing by standard deviation:
import tensorflow as tf
import numpy as np
series = np.random.random(10) + 10 * np.sin(np.random.random(1))
mean = np.mean(series)
std = np.std(series)
(series - mean) / std
tf.keras.utils.normalize(series)
Is there any pros/cons for either method?
tf normalize in [0,1] range, but we get values in [-1,1] range using the other method.