https://www.pycodemates.com/2023/08/backpropagation-through-time-explained-with-derivations.html