# My model accuracy doesn't change after first epoch

I've created a model to predict housing prices in LA, and what should be a simple regression problem, is giving me headache because the loss is just too big and my accuracy wont change.

I've already tried normalizing, changing the architecture (decreasing layers, hidden units), adding dropout, changed the loss function, batch size, epochs and my accuracy is still only 0.022

input_shape = X_train_2[0].shape

model = tf.keras.models.Sequential([
tf.keras.layers.Flatten(input_shape=input_shape),
tf.keras.layers.Dense(units=300, activation=tf.nn.relu),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.Dropout(0.1),
tf.keras.layers.Dense(units=300, activation=tf.nn.relu),
tf.keras.layers.BatchNormalization(),
tf.keras.layers.Dropout(0.1),
tf.keras.layers.Dense(units = 1, kernel_initializer = 'lecun_normal', activation='linear')
])

model.fit(X_train, y_train, epochs=5, batch_size=32)
model.summary()
model.evaluate(X_test_, y_test)


Training Log

Epoch 1/5 32444/32444 [==============================] - 1s
38us/sample - loss: 90230324650039.5469 - acc: 0.0012
Epoch 2/5
32444/32444 [==============================] - 1s 28us/sample -
loss: 90230315396180.2031 - acc: 0.0022
Epoch 3/5 32444/32444
[==============================] - 1s 27us/sample - loss:
90230293267377.3438 - acc: 0.0022
Epoch 4/5 32444/32444 [==============================] - 1s 27us/sample - loss:
90230260607518.6250 - acc: 0.0022
Epoch 5/5 32444/32444 [==============================] - 1s 28us/sample - loss:
90230216684525.4375 - acc: 0.0022

• Your loss seems very huge, but it is decreasing. Among the list of things you tried, I didn't see you try adjusting the learning rate. Could be that you need to increase it? – Chris Moorhead Apr 9 '19 at 1:34
• Can you add a sample input? Are the inputs normalized/scaled? I can imagine if they are not and you have houses for 1e6, the NN will give huge loss like that because the numbers themselves are big... also, if the inputs are scaled to something like (0,1), can't hurt to add a sigmoid in last layer. – Pavel Savine Apr 9 '19 at 1:39
• Simply change the loss to mse (Mean square error) as accuracy is not loss we should be using in regression. – thanatoz Apr 9 '19 at 4:50
• I normalized my inputs, but all my predictions are now 0.0 – Biel Borba Apr 9 '19 at 13:48

metrics = ['mean squared error']