简体   繁体   中英

Is this Keras LSTM model underfitting?

I think this model is underfitting. Is this correct?

模型损失

预测与真实

_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
lstm_1 (LSTM)                (50, 60, 100)             42400     
_________________________________________________________________
dropout_1 (Dropout)          (50, 60, 100)             0         
_________________________________________________________________
lstm_2 (LSTM)                (50, 60)                  38640     
_________________________________________________________________
dropout_2 (Dropout)          (50, 60)                  0         
_________________________________________________________________
dense_1 (Dense)              (50, 20)                  1220      
_________________________________________________________________
dense_2 (Dense)              (50, 1)                   21        
=================================================================

The above is a summary of the model.
Any advice on how the model could be improved?

When both, train and test losses are bad your model is under fitting which is not the case here. From the model loss plot, the train and test losses are close in value and good. Maybe more training data is helpful in this case looking at how quickly your train loss dropped. I think the data used for training and validation (first plot) is less and very related to one another (less variance). So the model is seeing vastly different type of data from your second plot, which it never saw during it's training (based on training and validation data set used for generating the model). As mentioned initially try removing dropout (that is what I meant by regularisation).

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