机器学习与深度学习系列连载: 第二部分 深度学习(十四)循环神经网络 2(Gated RNN - LSTM )

循环神经网络 2(Gated RNN - LSTM )

simple RNN 具有梯度消失或者梯度爆炸的特点,所以,在实际应用中,带有门限的RNN模型变种(Gated RNN)起着至关重要的作用,下面我们来进行介绍:

LSTM (Long Short-term Memory )

LSTM 是一个比较难理解的网络架构,有4个输入(3个Gate),1个输出
在这里插入图片描述

1 LSTM的运算过程

我们以x1,x2,x3 作为输入,最上面的蓝色为存储信息,最下面红色为输出信息:

When x2 = 1, add the numbers of x1 into the memory
When x2 = -1, reset the memory
When x3 = 1, output the number in the memory.
在这里插入图片描述

2. LSTM的组成

(1)每一个时间时间点
• Input gate (current cell ma[ers)
• Forget (gate 0, forget past)
• Output (how much cell is exposed)
• New memory cell
在这里插入图片描述
(2)输出
• Final memory cell:
• Final hidden state:
在这里插入图片描述
(3)结构
在这里插入图片描述

本专栏图片、公式很多来自台湾大学李弘毅老师、斯坦福大学cs229,斯坦福大学cs231n 、斯坦福大学cs224n课程。在这里,感谢这些经典课程,向他们致敬!

猜你喜欢

转载自blog.csdn.net/dukuku5038/article/details/83870172