# What is the difference? "Adding more LSTM layers" or "Increasing epochs"?

To get more accurate results which one is better? Adding more layers or increasing number of epochs? I like to know the difference between effects of these two approaches?

Increasing the number of epochs :

This is the best when you have a large and diverse dataset. A large dataset refers to a number of diverse samples in equal amounts ( no bias ). Also, you make your model generalise better, you might increase the dropout rates and decrease the learning rate. At such a time increasing the number of epochs would help the model generalise better. Also, since it has generalised on a diversed dataset means it can perform well in the real world. For LSTMs, they can make correct predictions based on the sequences.

Increasing the number of layers of LSTM :

If we treat each LSTM as a memory unit then we are increasing the number of memory units and thus the overall memory. The first sequences would be feed to the next layer hence a model could create a hierarchical representation of the data. This is better if you have sequences which have such a context like an image.

On considering both the scenarios, if you have abundant data then the first option is optimum. If you have complex data which has less diversity then the second and the first points need to be considered.

• How can I play with learning rate in Keras.LSTM?
– WDR
Feb 28 '19 at 11:11
• I referred the learning rate which is initialized with the optimizer in the fit() method of your model. If you are using an RMSprop optimizer for your model then model.fit( optimizer=keras.optimizers.RMSprop( lr=0.0001 ) , loss='categorical_crossentropy' ) where lr= is the learning rate. Feb 28 '19 at 12:11