LSTM,GRU,Bi-RNN

1. simple RNN
network has (causal) memory encoded in history vector (ht).
在这里插入图片描述
yt = function of previous and current words x1:t
= function of current word xt and previous words
approximately = function of xt and ht-1 (history vector outputed at time t-1
approximately = function of ht

recurrent unit图示:
在这里插入图片描述

在这里插入图片描述
更新公式:
在这里插入图片描述

2. LSTM

LSTM可解决:1. 梯度消失 2.梯度消失所导致的长期依赖问题 (simple RNN中因为存在梯度消失问题所以学习不到词间的长期依赖关系)。

1.1. LSTM图示

<版本1>

在这里插入图片描述

<版本2>
在这里插入图片描述
<版本3>
在这里插入图片描述
1.2. 更新公式

<版本1>
在这里插入图片描述
<版本2>

在这里插入图片描述
<版本3>

c: memory cell
a: activation value - i.e. hidden state
y^: output value
x: input value
在这里插入图片描述

GRU

图示:
在这里插入图片描述
更新公式:
在这里插入图片描述
在这里插入图片描述在这里插入图片描述

Bi-RNN

Use the complete sequence word 1:T to predict each word.
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
yt由两个history vector经过linear transformation (乘以weight matrix W, 加上bias)在经过activation function得出。

reference:
[1] 4F10: Deep Learning for Sequence Data
[2] https://www.bilibili.com/video/BV1Qb411p7mG
[3] https://www.bilibili.com/video/BV1JE411g7XF?p=20

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值