Clear Filters
Clear Filters

How can i change the number of iterations per epoch in LSTM RNN time series forecasting model?

25 views (last 30 days)
I have specified the number of epochs and the min batch size; however in the training process the number of iterations per epoch is still 1!. I have checked the previously asked questions and someone sugggested that i should use squence length option. However, my observations for all sequences are with the same length or have the same number of samples.
So my question is how to change the number of iterations per single epoch in LSTM RNN time series forecasting model?

Answers (1)

Sourabh
Sourabh on 21 Apr 2023
Edited: Sourabh on 21 Apr 2023
Greetings,
As far as I am aware, there is no option to manually set the number of iterations per epoch in the LSTM RNN time series forecasting model.
The number of iterations per epoch in a LSTM RNN time series forecasting model is determined by the batch size and the sequence length.
After ensuring that there is no issue with your training data, I would suggest varying the mini-batch size parameter. You could also try and increase your sequence length either by padding the sequences or by concatenating multiple sequences to see if it gives you your desired change in iterations.
It's also worth noting that the number of iterations per epoch is not necessarily a good indicator of your model’s performance. Instead, looking at the loss and/or accuracy metrics gives a better evaluation of your model. You can try adjusting the learning rate or optimizer to see if this improves the training process as well.
You might find the following links useful:
All the best.

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!