When using keras to train a model, how to use the output of one round as the input of the next round

Hello. I want to use keras for time series forecasting. When forecasting, I hope that the forecast result at time t will be used as the input at time t+1. So when I want to train, put the final output of the training at time t to time t+1 as input. May I ask how it can be implemented in keras. Or how can it be achieved with tensorflow.

Hi @huiming_zeng

Welcome to the TensorFlow Forum!

You can use RNN (Recurrent Neural Network) model which is specifically designed to process sequential data and can be used to make predictions based on the previous outputs of the model.

There is one exact code example available in Tensorflow doc named as ‘Time series forecasting’ referring which might be helpful to you.