tensorflow_cookbook icon indicating copy to clipboard operation
tensorflow_cookbook copied to clipboard

Suggestion for cleaner normalization implementation

Open ychong opened this issue 7 years ago • 1 comments

Hi,

If it's not too much, I have a suggestion for a cleaner implementation of x_vals normalization.

Instead of defining a separate function, and since the objective of normalization is just to allow for faster convergence, we could perform the following:

x_vals_train = x_vals_train / x_vals_train.max(axis=0) x_vals_test = x_vals_test / x_vals_test.max(axis=0)

This implementation is cleaner and achieve similar loss results. Do let me know what you think.

Sincerely, Yi Xiang [email protected]

ychong avatar Jan 29 '18 09:01 ychong

I'll look into this. Thanks!

nfmcclure avatar Mar 21 '18 19:03 nfmcclure