Data Science Stack Exchange is a question and answer site for Data science professionals, Machine Learning specialists, and those interested in learning more about the field. It only takes a minute to sign up.

1 Answer
1

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.

$\begingroup$How can I play with learning rate in Keras.LSTM?$\endgroup$
– user145959Feb 28 '19 at 11:11

$\begingroup$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.$\endgroup$
– Shubham PanchalFeb 28 '19 at 12:11