简体   繁体   中英

What does tensorflow.keras.utils.normalize actually do?

Documentation only says that it "Normalizes a Numpy array."

By normalization I expect that it makes the mean = 0 and standard deviation = 1 .

But when i run it on an array of [1,2,3], I get the following array:

[0.26726124 0.53452248 0.80178373]

Which has mean = 0.53 , and std = 0.21 .

It would be good to know what it means by normalize .

It means it L2-normalizes the given array, ie, it makes the sum of squares of each element of the array to be equal to one. You can find more information about L2-normalization by googling it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM