'forget gates' 如何知道不从 LSTM 的 Cell State 中删除基本信息?
How do 'forget gates' know not to remove essential information from the Cell State in an LSTM?
首先,如果这不适用于堆栈溢出,我深表歉意。这实际上不是与代码相关的问题,而是理论问题。
这对我来说不是很清楚。假设您有大量段落希望 LSTM 从中学习,它如何确保它不会删除第一段中的细节?
我相信this paper会有所帮助。它解释了反向传播算法。
另请注意,对于处理段落的 LSTM,多个 LSTM 块以顺序 和 并行方式使用。此外,神经网络 black boxes:我们不知道内部是如何工作的,它们自己弥补了哪些细节很重要。
在BPTT算法中,当词对最终输出的决定作用不大时,梯度会变小,权重会随着训练的进行而变小。它是自动的,因为 LSTM 机制决定了它。
对于你的担心,你可能会误解LSTM,LSTM可以解决梯度消失问题,因为它将continually multiply
转换为continually plus
。简单来说hi = a1*h1+a2*h2+a3*h3+...,后面的输出是前面每一个输出的函数,所以梯度不变。可以参考An Empirical Exploration of Recurrent Network Architectures for details of the gradient accumulation theory. In addition, nowadays attention mechanism is wide applied and is more appropriate for you need, you can see Neural Machine Translation By Jointly Learning To Align and Translate.
首先,如果这不适用于堆栈溢出,我深表歉意。这实际上不是与代码相关的问题,而是理论问题。
这对我来说不是很清楚。假设您有大量段落希望 LSTM 从中学习,它如何确保它不会删除第一段中的细节?
我相信this paper会有所帮助。它解释了反向传播算法。
另请注意,对于处理段落的 LSTM,多个 LSTM 块以顺序 和 并行方式使用。此外,神经网络 black boxes:我们不知道内部是如何工作的,它们自己弥补了哪些细节很重要。
在BPTT算法中,当词对最终输出的决定作用不大时,梯度会变小,权重会随着训练的进行而变小。它是自动的,因为 LSTM 机制决定了它。
对于你的担心,你可能会误解LSTM,LSTM可以解决梯度消失问题,因为它将continually multiply
转换为continually plus
。简单来说hi = a1*h1+a2*h2+a3*h3+...,后面的输出是前面每一个输出的函数,所以梯度不变。可以参考An Empirical Exploration of Recurrent Network Architectures for details of the gradient accumulation theory. In addition, nowadays attention mechanism is wide applied and is more appropriate for you need, you can see Neural Machine Translation By Jointly Learning To Align and Translate.