GRU is a good advice, thank you, I have all the y^i for the learning process, how should I calculate the loss?
And about LSTM, are there any options to do it via PyTorch, not implementing LSTM from scratch?