nn.LSTM, nn.Embedding, nn.Tanh C++ Implementations

Hi,

I need C++ backend implementations of nn.LSTM, nn.Embedding and nn.Tanh for a project that I must match exact or close behaviour of PyTorch. I was able to find code but couldn’t be sure. Could you please pin these implementations?

Thanks

Could you post the code locations you have already found so that we could double check them, please?

Yeah, sure my bad. I had to include it. This is LSTM implementation I found:

Please let me know if this is correct. I haven’t had a chance to look for Embedding and Tanh but those should be pretty straightforward.

Thanks