I\'m attemping to translate an old TensorFlow code into a PyTorch equivalent, and I\'m struggling with understanding TensorFlow\'s implementation of LSTMs.
Original code: