cs231n-notes-Lecture-10:Recurrent Neural Networks

Recurrent Neural Networks: Process Sequences

在这里插入图片描述

  • one to one: Vanilla Neural Networks. raw
  • one to many: eg. Image Captioning image -> sequence of words
  • many to one: e.g. Sentiment Classification sequence of words -> sentiment
  • many to many: e.g. Machine Translation seq of words -> seq of words
(Vanilla) Recurrent Neural Network

h t = f ( h t − 1 , x t ) h_t = f(h_{t-1},x_t) ht=f(ht1,xt)
h t = t a n h ( W h h t − 1 + W x x t ) h_t = tanh(W_{h} h_{t-1}+W_{x}x_t) ht=tanh(Whht1+Wxxt)
y = W y h t y = W_yh_t y=Wyht

Truncated backpropagation through time
  • Run forward and backward through chunks of the sequence instead of whole sequence

在这里插入图片描述

Image Captioning with Attention

在这里插入图片描述

  • CNN网络生成L个D维的feature,代表L个location的feature
  • RNN迭代每一步生成一个L个位置的分布向量,表示图片中L个位置中每个位置的attention权重
Long Short Term Memory (LSTM)

在这里插入图片描述

Difference to avoid gradient vanishment:

  • Backpropagation from c t c_t ct to c t − 1 c_{t-1} ct1 only elementwise multiplication by f, no matrix multiply by W.
  • f is different at every step. In Vanilla RNN, it always multiply the same matrix.
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值