深度学习入门(3) - CNN

CNN

Convolutional Layer

We use a filter to slide over the image spatially (computing dot products)

请添加图片描述

Interspersed with activation function as well

What it learns?

First-layer conv filters: local image templates (Often learns oriented edges, opposing colors)

Problems:
  1. For large images, we need many layers to get information about the whole image

​ Solution: Downsample inside the network

  1. Feature map shrinks with each layer

    Solution: Padding : adding zeros around the input

Pooling layer

-> downsampling

Without parameters that needs to be learnt.

ex:

max pooling

Aver pooling

FC layer(Fully Connected)

The last layer should always be a FC layer.

Batch normalization

we need to force inputs to be nicely scaled at each layer so that we can do the optimization more easily.

Usually inserted after FC layer / Convolutional layer, before non-linearity

Pros:

make the network easier to train

robust to initialization

Cons:

behaves differently during training and testing

请添加图片描述

Architechtures (History of ImageNet Challenge)

AlexNet

Input 3 * 277 * 277

Layer filters 64 kernel 11 stride 4 pad 2

We need to pay attention to the Memory, pramas, flop size
请添加图片描述

ZFNet

larger AlexNet

VGG

Rules:

  1. All conv 3*3 stride 1 pad 1
  2. max pool 2*2 stride 2
  3. after pool double channels

Stages:

conv-conv-pool

conv-conv-pool

conv-conv-pool

conv-conv-[conv]-pool

conv-conv-[conv]-pool

GoogLeNet

Stem network: aggressively downsamples input

Inception module:

请添加图片描述

Use such local unit with different kernal size

Use 1*1 Bottleneck to reduce channel dimensions

At the end, rather than flatting to destroy the spatial information with giant parameters

GoogLeNet use average pooling: 7 * 7 * 1024 -> 1024

There is only on FClayer at the last.

找到瓶颈位置,尽可能降低需要学习的参数数量/内存占用

Auxiliary Classifiers:

To help the deep network converge (batch normalization was not invented then): Auxiliary classification outputs to inject additional gradient at lower layers

Residual Networks

We find out that, somtimes we make the net deeper but it turns out to be underfitted.

Deeper network should strictly have the capability to do whatever a shallow one can, but it’s hard to learn the parameters.

So we need the residual network!

请添加图片描述

This can help learning Identity, with all the parameters to be 0.

The still imitate VGG with its sat b

ResNeXt

Adding grops improves preforamance with same computational complexity.

MobileNets

reduce cost to make it affordable on mobile devices

Transfer learning

We can pretrain the model on a dataset.

When applying it to a new dataset, just finetune/Use linear classifier on the top layers.

Froze the main body of the net.

有一定争议,不需要预训练也能在2-3x的时间达到近似的效果

  • 18
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
如果你想入门深度学习并使用MATLAB作为工具,下面是一些步骤和资源供你参考: 1. 了解基础知识:深度学习是机器学习中的一个分支,它模仿人脑神经网络的工作原理。在开始使用MATLAB进行深度学习之前,建议你先了解机器学习和神经网络的基础知识。 2. 安装MATLAB:确保你已经安装了MATLAB软件。如果还没有安装,你可以从MathWorks官方网站上下载并安装MATLAB。 3. 学习MATLAB深度学习工具箱:MATLAB提供了专门用于深度学习的工具箱,其中包含了许多函数和工具,方便你进行深度学习的实验和应用。你可以通过查阅MATLAB的官方文档、教程和示例来学习如何使用这些工具。 4. 学习深度学习算法:了解深度学习的基本算法和概念,例如卷积神经网络(CNN)、循环神经网络(RNN)和生成对抗网络(GAN)等。你可以通过阅读相关的教材、论文和在线资源来学习这些算法。 5. 实践项目:选择一些简单的深度学习项目,并用MATLAB实现。例如,你可以尝试使用MATLAB进行图像分类、目标检测或语音识别等任务。通过实际操作,你可以更好地理解深度学习算法的原理和实现方法。 6. 参考资源:除了MATLAB官方文档外,还有一些其他资源可以帮助你入门深度学习。例如,MATLAB官方网站上有一些示例代码和教程,还可以参考一些在线课程和书籍,如《Deep Learning with MATLAB》等。 希望以上信息能帮助你入门深度学习并使用MATLAB进行实践。祝你成功!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值