Convolutional neural networks

Convolutional neural networks

@(深度学习)

a convolutional neural network can learn a neuron once and use it in many places, making it easier to learn the model and reducing error.
学习一次,使用多次

传统的fully-connected layer:
Alt text

We care a lot about local properties of the data: What frequency of sounds are there around a given time? Are they increasing or decreasing? And so on.
我们更关系数据局部的性质

Alt text

Convolutional layers are often interweaved with pooling layers. In particular, there is a kind of layer called a max-pooling layer that is extremely popular.

Alt text

应用到2D:
Alt text

针对一张图片而言,没有必要精确的指定每个像素的信息

理解卷积

cifar10

代码组织

  • cifar10_input.py 读取数据
  • cifar10.py 构建模型
  • cifar10_train.py 训练
  • cifar10_eval.py 评价和预测

To NLP

理解卷积:应用于矩阵的滑动窗口函数
enter image description here

sliding window也被称为kernel,filter or feature detector

Location Invariance and Compositionality.

把词矩阵当作是一个图,词和对应的词向量

Alt text

All models are wrong, but some are useful.

CNN Hyperparameters

Narrow vs. Wide convolution

How would you apply the filter to the first element of a matrix that doesn’t have any neighboring elements to the top and left?

zero-padding(0-填充),所有矩阵以外的元素都用0表示,也称为wide convolution
不使用zero-padding的称为narrow convolution

Stride Size

步幅大小,filter移动的大小

Pooling Layers

pooling layers 对输入进行二次采样

Alt text

为什需要pooling?
- pooling提供了固定大小的输出矩阵,例如对1000个filters应用max pooling,会得到1000维的输出,与每个filters的大小无关。这样,用不同长度的句子进行输入
- pooling具有降维的作用

Channels

不同的通道,表示了对输入数据不同角度的观察,针对图片识别而言,有红,绿,蓝三个通道。针对自然语言而言,例如可以从不同的词向量角度

max-pooling always beat average pooling
regularization doesn’t seem to make a big different in the NLP tasks that were considered

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值