Tensorflow中文文档中有非常详细的RNN实现教程,链接:
tensorflow中文文档:http://www.tensorfly.cn/tfdoc/tutorials/overview.html
但是其中对于模型本身的原理没有涉及,故理解RNN、LSTM需要另找资料:
一篇LSTM英文教程:http://colah.github.io/posts/2015-08-Understanding-LSTMs/
从文章中看出,对LSTM的理解其实就是对这张图的理解。
尝试阅读如下代码:
RNN实现文本感情判断:https://github.com/roopalgarg/lstm-tensorflow