lalala
lalala

Reputation: 15

Data normalization in Python CNN model training

I am doing a model training of CNN in Python and I have a question. I know that data normalization is important to scale the data in my dataframe between 0 and 1, but let's say I perform z-score normalization on my dataframe VERTICALLY (which means scale the data within the scope of each feature), but after I deployed the model and want to use it on real world scenarios, I only have one row of data in my dataframe (but with same amount of features), I am not able to perform normalization anymore because there is only one data for each feature. The standard deviation will be 0 and division of 0 in z-score is not applicable.

I want to confirm that do I still need to perform data normalization on real world scenarios? If I do not need to, will the result differs because I did normalization during my model training?

Upvotes: 0

Views: 259

Answers (1)

Aneesh Das
Aneesh Das

Reputation: 96

If you are using a StandardScaler from scikit-learn. You need to save the scaler object and use it for transforming new data after deployment.

Upvotes: 2

Related Questions