深度学习入门(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的时间达到近似的效果

相关推荐
IT研究所13 分钟前
IT 资产管理 (ITAM) 与 ITSM 协同实践:构建从资产到服务的闭环管理体系
大数据·运维·人工智能·科技·安全·低代码·自动化
沐曦股份MetaX1 小时前
基于内生复杂性的类脑脉冲大模型“瞬悉1.0”问世
人工智能·开源
power 雀儿1 小时前
张量基本运算
人工智能
陈天伟教授1 小时前
人工智能应用- 人工智能交叉:01. 破解蛋白质结构之谜
人工智能·神经网络·算法·机器学习·推荐算法
政安晨2 小时前
政安晨【人工智能项目随笔】使用OpenClaw的主节点协同子节点撰写大型技术前沿论文的实战指南
人工智能·ai agent·openclaw论文写作·openclaw论文写作经验·ai代理写论文·ai分布式协作·oepnclaw应用
大成京牌2 小时前
2026年京牌政策深度对比,三款优质车型选购推荐榜单探索
人工智能
听麟4 小时前
HarmonyOS 6.0+ 跨端会议助手APP开发实战:多设备接续与智能纪要全流程落地
分布式·深度学习·华为·区块链·wpf·harmonyos
xuxianliang4 小时前
第154章 “神谕”的低语(AI)
人工智能·程序员创富
geneculture4 小时前
人机互助新时代超级个体(OPC)的学术述评——基于人文学科与数理学科的双重视域
大数据·人工智能·哲学与科学统一性·信息融智学·融智时代(杂志)
KG_LLM图谱增强大模型4 小时前
给具身智能装上图谱大模型大脑,7B小模型超越72B大模型!层次化知识图谱让复杂机器人规划能力暴增17%,能耗大幅降低
人工智能·机器人·知识图谱