This is a place where C++ Pytorch examples are given.
Link: https://github.com/prabhuomkar/pytorch-cpp/tree/master/tutorials 26
For RNN: https://pytorch.org/tutorials/advanced/cpp_frontend.html 32
I hope it helps