StandardScaler's mean and standard deviation for real-life data? I've heard that we should use train dataset's scale for that of test data so they are in line with each other in terms of scale.
And I know we use transform() function for the test data preprocessing.
But I am wondering how I can apply the same logic to the real-life data set after we successfully save and load a model since I don't think we can use transform() function anymore.
From what I understand, there must be a way to &quot;extract&quot; mean and standard deviation from the train data set and to apply it for real-life model when using the model we saved already, but how can we do that?
It has to be saved somewhere i.e. Database after the training is done.
The saved values should be used on new data and all these steps should work in a loop i.e. when you re-train again the values will be updated and saved again.
e.g. If we see the Keras pre-trained models, it provides the necessary pre-processing function. We can directly use that
from keras.applications.resnet50 import preprocess_input
train_datagen = ImageDataGenerator( preprocessing_function=preprocess_input)