CS224N notes_chapter13_CNN

第十三讲 CNN

##未完 且有可能不续

From RNN to CNN

RNN can only capture a phrase given its left side context.
#就是说,你如果想拿到RNN对某一个输入向量的处理结果,你需要把它前边的输入都过一遍,而不能只拆出其中的一部分

Main CNN idea:
Compute vectors for every possible phrase.

  • Regardless of whether phrase is grammatical
  • Not vary linguistically or cognitively plausible

#这些也导致CNN只能观察到局部的一些特征
#笔者这里跳过了卷积的定义

Single Layer CNN

Example:
Word vectors: x i ∈ R k \mathbf x_i\in \mathbb{R^k} xiRk
Sentence:
x i : n = x 1 ⊕ x 2 ⊕ . . . ⊕ x n \mathbf x_{i:n}=\mathbf x_1 \oplus \mathbf x_2 \oplus...\oplus \mathbf x_n xi:n=x1x2...xn
Concatenation of words in range:
x i : i + j \mathbf x_{i:i+j} xi:i+j
Conv vector: w ∈ R h k \mathbf w \in \mathbf{R}^{hk} wRhk
#每次读入h个单词,然后输出一个分数
Padding: to make output the same length as input.
Pooling: capture most important activation.
#课程中是这样解释Pooling的: 设想你的卷积操作是针对2-gram去做的,那么你的卷积核在移动过程中,会对特定的2-gram词组产生比较强的响应值,max-pooling能将这个最强的响应记录下来。
#相应地,我们也可以加入3-gram,4-gram,同时做max-pooling,最终把他们的结果串在一起,那么我们就得到了一个能看到2,3,4-gram的特征向量。
#之后我们再用得到的这个特征向量做分类或其他问题。

Dropout

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值