Nearing Completion, Seeking Guidance on LSTMCell and Optimizer Conversion (TensorFlow to PyTorch)

I’m in the final stages of meticulously converting a TensorFlow model to PyTorch. While I’ve made significant progress, I’m encountering a specific hurdle in translating the LSTMCell method and optimizer implementation.
The code links: Tensorflow Code LinkPytorch Code Link