Stacked LSTM learns to predict sine wave sequences and forecast future values
A stacked LSTM (two LSTMCell layers) learns to model sine wave patterns. After training on the input sequence, it can predict future values (shown as dashed line). The model learns the underlying frequency and phase of the signal through sequential processing.