0

A LSTM layer is a recurrent neural network that uses previous data to predict (more or less). My question comes in order to train it. Due to its use in a time series, it is better to use model.fit() to fit all at once (suitable in my PC) or train_on_batch() to upgrade the gradient simulating a time series?

Omar
  • 1,029
  • 2
  • 13
  • 33
  • 1
    There is no difference, because each sample in your batch is one time series. – Dr. Snoopy Mar 09 '22 at 21:33
  • @Dr.Snoopy so there is no difference in fitting the whole dataset at once and using `train_on_batch()` with each sample in an incremental learning? – Omar Mar 10 '22 at 07:51
  • Please can you refer [this](https://stackoverflow.com/questions/49100556/what-is-the-use-of-train-on-batch-in-keras) thread may help you. Thanks! –  Mar 20 '22 at 12:53

0 Answers0