Hi there,
I was following this tutorial online for predicting time series:

  
      
      Stack Abuse
  
  
    

Time Series Prediction using LSTM with PyTorch in Python 1

Time series data, as the name suggests is a type of data that changes with time.
For instance, the temperature in a 24-hour time period, the price of various
products in a month, the stock prices of a particular company in a year.
Advanced deep...


  
  
    
    
  
  


I don’t like how the hidden state is reset to zero for each training batch, as surely that is getting rid of important information about the previous state of the system? Would it be wrong to use the output (the final hidden state), as the initial hidden state for the next training batch in a time series? My project involves a sort of Kalman filter, so in that context, I feel like it would make sense to keep using the previous state given an initial hidden state.