CS231n学习笔记--10.Recurrent Neural Networks
来源:互联网 发布:sqlserver 实例名称 编辑:程序博客网 时间:2024/05/19 12:38
1. Recurrent Neural Network
RNN 的关键点之一就是他们可以用来连接先前的信息到当前的任务上,例如使用过去的视频段来推测对当前段的理解。
有时候,我们仅仅需要知道先前的信息来执行当前的任务。例如,我们有一个语言模型用来基于先前的词来预测下一个词。如果我们试着预测 “the clouds are in the sky” 最后的词,我们并不需要任何其他的上下文 —— 因此下一个词很显然就应该是 sky。在这样的场景中,相关的信息和预测的词位置之间的间隔是非常小的,RNN 可以学会使用先前的信息。
Recurrent Neural Network 框架:
Tips:
the same function and the same set of parameters are used at every time step.
普通Recurrent Neural Network:
多输入输出的RNN架构:
多输入单一输出的RNN架构:
单一输入多输出的RNN架构:
应用于编解码场景:
单词构建场景训练阶段:
单词构建场景测试阶段:
RNN前后向传输计算t梯度策略:
1.前后向传输均使用完整序列
- 前后向传输均使用分块序列
3.前使用完整序列, 后向传输使用分块序列
CNN+RNN进行图像内容识别:
Image Captioning with Attention:
Tips:
vi指的是CNN之后的图像分块特征,pi指的是该图像块包含特征词汇的概率。
Soft attention:指的是该词汇参考全图,不过每块有权重大小区别。
Hard attention:指的是该词汇参考某块图像块。
RNN用于问题解答:
2. LSTM
会有一些更加复杂的场景。假设我们试着去预测“I grew up in France… I speak fluent French”最后的词。当前的信息建议下一个词可能是一种语言的名字,但是如果我们需要弄清楚是什么语言,我们是需要先前提到的离当前位置很远的 France 的上下文的。这说明相关信息和当前预测位置之间的间隔就肯定变得相当的大。
不幸的是,在这个间隔不断增大时,RNN 会丧失学习到连接如此远的信息的能力。
LSTM 通过刻意的设计来避免长期依赖问题。记住长期的信息在实践中是 LSTM 的默认行为,而非需要付出很大代价才能获得的能力!
多个传统RNN级联存在的问题,梯度爆炸/消失:
LSTM架构:
特别要注意的因为激活函数是sigmoid的,所以i,f,0均二值化的数值,所以可以缓解传统RNN存在的梯度问题!
LSTM与ResNet的相似之处:
其他模型:
进一步理解,可参考博客:理解 LSTM 网络
3. Summary
RNNs allow a lot of flexibility in architecture design
- Vanilla RNNs are simple but don’t work very well
- Common to use LSTM or GRU: their additive interactions improve gradient flow
- Backward flow of gradients in RNN can explode or vanish. Exploding is controlled with gradient clipping. Vanishing is controlled with additive interactions (LSTM)
- Better/simpler architectures are a hot topic of current research
- Better understanding (both theoretical and empirical) is needed.
- CS231n学习笔记--10.Recurrent Neural Networks
- [深度学习论文笔记][Recurrent Neural Networks] Visualizing and Understanding Recurrent Networks
- 循环神经网络(RNN, Recurrent Neural Networks)学习笔记:基础理论
- 20170326#cs231n#11.Recurrent Neural Networks 循环神经网络RNN
- CS231n学习笔记--4.Backpropagation and Neural Networks
- CS231n学习笔记--5.CNN&&6-7. Training Neural Networks
- 论文笔记:Depth-Gated Recurrent Neural Networks
- Recurrent Neural Networks Tutorial阅读笔记
- 深度学习(2):Recurrent Neural Networks
- 【CS231n笔记】07 Convolutional Neural Networks
- Gated Recurrent Neural Networks
- Recurrent Neural Networks Tutorial
- Recurrent Neural Networks - collections
- Recurrent Neural Networks regularization
- Recurrent Neural Networks
- Recurrent Neural Networks
- CS231N-10-Recurrent Neural Network
- deeplearning论文学习笔记(2)A critical review of recurrent neural networks for sequence learning
- 自动返回顶部的实现
- 如何查看自己电脑是否安装jdk和安装路径
- win10下安装theano和keras
- C语言 C语言分解质因数的算法,以及动态一维数组保存分解的质因数的每一项
- 十一假期前一定要看的一篇文
- CS231n学习笔记--10.Recurrent Neural Networks
- 重建二叉树
- RNN和LSTM相关资料汇总
- 递归与分治策略-2.7合并排序(归并排序)
- 利用pycharm编辑jupyter notebook
- MariaDB二进制安装步骤以及数据库的基本操作
- ActiveMQ之浅谈一
- 水题合集
- 倒计时 今年还有多少时间