cs231n-notes-Lecture-10:Recurrent Neural Networks

本文介绍了如何使用循环神经网络(RNN)处理不同类型的序列数据,包括一对一、一对多、多对一及多对多的场景,并详细探讨了RNN的工作原理、截断回传误差法以及长短期记忆网络(LSTM)解决梯度消失问题的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

ht=f(ht−1,xt)h_t = f(h_{t-1},x_t)ht=f(ht1,xt)
ht=tanh(Whht−1+Wxxt)h_t = tanh(W_{h} h_{t-1}+W_{x}x_t)ht=tanh(Whht1+Wxxt)
y=Wyhty = W_yh_ty=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 ctc_tct to ct−1c_{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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值