# Validation loss and validation accuracy stay the same in NN model

I am trying to train a keras NN regression model for music emotion prediction from audio features. (I am a beginner in NN and I am doing this as study project.) I have 193 features for training/prediction and it should predict valence and arousal values.

I have prepared a NN model with 5 layers:

model = Sequential()


And this is my loss and optimizer metrics:

model.compile( loss = "mean_squared_error", optimizer = 'RMSprop', metrics=['accuracy'] )


When I try to train this model, I get this graph for loss and validation:

So the model is trained and reaches accuracy of >0.9 on training data, but on test data accuracy wont fall, but it stays on ~0.5.

I don't know how to interpret this graph. I don't think this is overfitting, because validation accuracy wont fall, but it stays the same. How can I try fix this?

Update: I tried to add dropout and regularization and it worked in a way that now I clearly see that I have a problem with over-fitting. But now I am stuck again. I can not make my model to decrease validation loss. It always stops at about 0.3 validation loss. I tried changing my model architecture, data preprocessing, optimizer function, and nothing helped.

• Change the last Layer's Activation to Linear. Metric to MSE if its a Regression case Nov 26 '20 at 15:40

You say it's a regression task, predicting valence and arousal values, although you use accuracy as a performance metric. This does not make much sense, so your accuracy graph doesn't really say much. MSE is a valid performance metric for regression tasks in general, so your loss graph is more descriptive of what is going on. The loss-graph most definitely displays the characteristic of over-fitting, so I would recommend you to add regularization to your model.

This can be done by for example incorporating dropout and L1/L2-regularisation.

• Thank you for answer. I am a beginner in NN and I am doing this as study project. I tried to add dropout and regularization and it worked in a way that now I clearly see that I have a problem with over-fitting. But now I am stuck again. I can not make my model to decrease validation loss. It always stops at about 0.3 validation loss. I tried changing my model architecture, data preprocessing, optimizer function, and nothing helped. Nov 26 '20 at 9:24
• I would recommend you to start with a much smaller model with only one dense layer, with perhaps 50 neurons, together with regularization-parameters so that training loss and validation loss stay roughly the same. This should give you a baseline performance. Now increase the number of neurons and the number of hidden layers, and tweak the regularization to see if you can get increased performance. Nov 26 '20 at 10:35

In case of any linear model one should not use any kind of activation function as by default nn provides linear output if we dont apply any activation on it. You nn should look like this:

model = Sequential()
$$$$
`