Normalization of input data in Keras
问题 One common task in DL is that you normalize input samples to zero mean and unit variance. One can "manually" perform the normalization using code like this: mean = np.mean(X, axis = 0) std = np.std(X, axis = 0) X = [(x - mean)/std for x in X] However, then one must keep the mean and std values around, to normalize the testing data, in addition to the Keras model being trained. Since the mean and std are learnable parameters, perhaps Keras can learn them? Something like this: m = Sequential()