Skip to content Skip to sidebar Skip to footer

Tensorflow - I Get Inaccurate Predictions, Nan And Infinite Values When Trying To Predict Price

I've started learning Tensorflow recently and I managed to write some simple code which predicts price of house. I am new to machine learning, therefore I still have to learn a lo

Solution 1:

Normalize your data and then pass it to your network will fix the problem. To this aim, StandardScaler or MinMaxScaler may help you.

from sklearn.preprocessing import StandardScaler
data = [[0, 0], [0, 0], [1, 1], [1, 1]]
scaler = StandardScaler()
new_data = scaler.fit_transform(data)
...
# feed new_data to the neural network

Post a Comment for "Tensorflow - I Get Inaccurate Predictions, Nan And Infinite Values When Trying To Predict Price"