【RegNet】《Designing Network Design Spaces》

news/2024/4/29 15:31:53/文章来源:https://blog.csdn.net/bryant_meng/article/details/126841380

在这里插入图片描述

CVPR-2020


文章目录

  • 1 Background and Motivation
  • 2 Related Work
  • 3 Advantages / Contributions
  • 4 Design Space Design
    • 4.1 Tools for Design Space Design
    • 4.2 The AnyNet Design Space
    • 4.3 The RegNet Design Space
    • 4.4 Design Space Generalization
  • 5 Experiments
    • 5.1 Datasets
    • 5.2 Analyzing the RegNetX Design Space
    • 5.3 Comparison to Existing Networks
    • 5.4 Appendix
  • 6 Conclusion(own) / Future work


1 Background and Motivation

本文 present a new network design paradigm

类似于手动设计一些网络设计准则,区别于 AutoML 针对特定数据集和预定的算子学出来一个网络(finding the
best network instances within a fixed, manually designed search space——which we call a design space),作者设计网络准则,基于该准则可以设计出很多性能不错的网络——design network design spaces(not just particular network instantiations, but also design principles

在这里插入图片描述

Our goal is to help advance the understanding of network design and discover design principles that generalize across settings.

2 Related Work

  • Manual network design
    早些年的网络都属于这个范畴,比如 VGG / ResNet / DenseNet / MobileNet
    In fact, our methodology is analogous to manual design but performed at the design space level(虽然也是手动,但设计网络准则,而不是单个网络)

  • Automated network design
    NAS 等

  • Network scaling
    eg:EfficientNet

  • Comparing networks
    a methodology for comparing and analyzing populations of networks sampled from a design space(distribution-level view)

  • Parameterization

3 Advantages / Contributions

提出了一些设计准则,基于这些准则设计出了系列网络(不同大小)——RegNet

outperform the popular EfficientNet(SOTA) models while being up to 5× faster on GPUs

4 Design Space Design

The overall process is analogous to manual design, elevated to the population level(系列网络,而不是单个网络) and guided via distribution estimates of network design spaces

RegNet,regular Network
AnyNet,widths and depths vary freely across stages

compute regimes, schedule lengths, and network block types

4.1 Tools for Design Space Design

space by sampling a set of models from that design space and characterizing the resulting model error distribution

comparing distributions is more robust and informative than using search

error empirical distribution function (EDF)
在这里插入图片描述
EDF for n = 500 sampled models from the AnyNetX design space

在这里插入图片描述
在这里插入图片描述
图例里面是 [x | y] 分别表示 min error 和 mean error

分布图的含义, all(深蓝色点),good(浅蓝色区域),best(黑色线)

MF = million flops = 10610^6106

GF = 10910^9109

设计 design space 的流程如下

在这里插入图片描述

EDF 的计算细节如下
在这里插入图片描述
用的 bootstrap 有放回的抽样

95% CI(Confidence Interval)

95%CI在统计学中时什么意思

在这里插入图片描述
计算方法就是 上图的横坐标,涉及到平均值和方差,还有关键的 1.96

如何理解95%置信区间

换句话说,95%置信区间是评价总体平均值的一个范围。我们进行100组实验,只有5组实验数据的平均值是落在这个范围之外的

4.2 The AnyNet Design Space

AnyNet 的网络结构

  • stem(下采样一次)
  • body(下采样四次,4 个 stage)
  • head

We keep the stem and head fixed and as simple as possible, and instead focus on the structure of the network body

在这里插入图片描述
在这里插入图片描述
作者 design 的 design space 集中在 body 的

  • stage iii,共 4 种
  • the number of blocks di⩽16d_i \leqslant 16di16,16种
  • block widths wi⩽1024w_i \leqslant 1024wi1024 and divisible by 8,128 种
  • bottleneck ratios bi∈{1,2,4}b_i \in \{1,2,4\}bi{1,2,4},3种
  • group widths gi∈{1,2,4,8,16,32}g_i \in \{1,2,4,8,16,32\}gi{1,2,4,8,16,32},6 种

作者的目标

  1. to simplify the structure of the design space,
  2. to improve the interpretability of the design space,
  3. to improve or maintain the design space quality,
  4. to maintain model diversity in the design space.

不同的网络空间

1)AnyNetXA

搜索空间 (16⋅128⋅3⋅6)4≈1.85⋅1018(16 \cdot 128 \cdot 3 \cdot 6 )^4 \approx 1.85 \cdot 10^{18}(1612836)41.851018

2)AnyNetXB

shared bottleneck ratio bi=bb_i = bbi=b for all stages iii
在这里插入图片描述在这里插入图片描述
AnyNetXA 和 AnyNetXB 的比较如图 5 left 所示

b⩽2b \leqslant 2b2 is best in this regime (right,还是 all-good-best)

最好的是 1,说明既不是 bottleneck 也不是 inverted bottleneck

3)AnyNetXC
use a shared group width gi=gg_i = ggi=g for all stages to obtain AnyNetXC

AnyNetXA 和 AnyNetXB 的比较如图 5 middle 所示

find g > 1 is best(图中没有展示出来,也即 DW 不是最优的)

作者进一步 examine typical network structures of both good and bad networks from AnyNetXC

在这里插入图片描述
在这里插入图片描述
发现效果比较好的网络遵循 wi+1≥wiw_{i+1} \geq w_iwi+1wi,于是加了这个限制条件设计出了 AnyNetXD

4)AnyNetXD

wi+1≥wiw_{i+1} \geq w_iwi+1wi
在这里插入图片描述
在这里插入图片描述
图 7 left 所示

5)AnyNetXE
di+1≥did_{i+1} \geq d_idi+1di

图 7 right 所示

搜索空间变成了 3867⋅11716640⋅3⋅6≈8.17⋅10113867\cdot 11716640\cdot 3 \cdot 6 \approx 8.17 \cdot 10^{11}386711716640368.171011

3867 是由 16 满足 ≤ 条件推算出来的
11716640 同理,是 128 推算出来的(和作者给出的 table 1 是有点出入的)

复杂度如作者描述的那样,cumulative reduction of O(107)O(10^7)O(107) from AnyNetXA(101810^{18}1018->101110^{11}1011

4.3 The RegNet Design Space

在这里插入图片描述
在这里插入图片描述
iii and jjj to index over stages and blocks(也即深度,深度的最小单位是 block 而非 conv)

wjw_jwj = 48⋅(j+1)48·(j+1)48(j+1) for 0⩽j⩽200 \leqslant j \leqslant 200j20 (solid black curve, please note that the y-axis is logarithmic,y 轴这点很关键,不然你肯定会有疑问,图8左上那张图,黑色明明是条曲线,怎么还是个线性方程).

linear parameterization for block widths

uj=w0+wa⋅jfor0⩽j<du_j = w_0 + w_a \cdot j \space \space \space \space for \space \space 0 \leqslant j < duj=w0+waj    for  0j<d

  • jjj 表示网络的 depth(最小深度单元是 block,而非单个 conv)
  • w0w_0w0 ,initial width(通道数)
  • waw_awa ,slope

在这里插入图片描述
来自 《Designing Network Design Spaces》的整体解读(一篇更比六篇强)

不同的深度,不同的初始化通道数,和不同的通道数增长率(block 内的 conv 间),generates a different block width uju_juj

block widths

uj=w0⋅wmsju_j = w_0 \cdot w_m^{s_j}uj=w0wmsj

w0w_0w0wmw_mwmsjs_jsj 重新表示下 uju_juj,已知 w0w_0w0waw_awa 可以求出 uju_juj 进而结合 wmw_mwm 可以求出 sjs_jsj

quantized per-block widths wjw_jwj

wj=w0⋅wm⌊sj⌉w_j = w_0 \cdot w_m^{\left \lfloor s_j \right \rceil}wj=w0wmsj

其中 ⌊⌉\left \lfloor \right \rceil 表示 round 操作,sjs_jsj round 后就可以推导出实际网络的 block widths

这也就是这个图为啥同时给出了 waw_awaw0w_0w0wmw_mwm 的含义

感觉这个 ⌊⌉\left \lfloor \right \rceil 也是 quantized linear 限制条件的核心操作了

在这里插入图片描述
横坐标 block index jjj(也即深度),纵坐标 wjw_jwj(通道数)

RegNet = AnyNetXE + wwwddd 之间的约束 (ddd < 64, w0w_0w0,waw_awa < 256, 1.5 < wmw_mwm < 3 and bbb and ggg as before)

在这里插入图片描述
在这里插入图片描述
w0=waw_0 = w_aw0=wa 比较猛

在这里插入图片描述

4.4 Design Space Generalization

在这里插入图片描述
在这里插入图片描述

  1. R block: same as the X block except without groups,
  2. V block: a basic block with only a single 3×3 conv,
  3. VR block: same as V block plus residual connections.

5 Experiments

5.1 Datasets

  • ImageNet
  • ImageNetv2

5.2 Analyzing the RegNetX Design Space

1)RegNet trends
在这里插入图片描述
在这里插入图片描述

optimal depth of ~20 blocks (60 layers)
use a bottleneck ratio b of 1.0(既不是 bottleneck,也不是 inverted bottleneck)
wmw_mwm of good models is ~2.5(not identical to the popular recipe of doubling widths across stages

g,wa,w0g, w_a, w_0g,wa,w0 increase with complexity

2)Complexity analysis

activations, which we define as the size of the output tensors of all conv layers

在这里插入图片描述
在这里插入图片描述
左上角图中,www 是通道数,r2r^2r2 是分辨率,ggg 注意是组宽而不是组数

上面一排靠后的两个图中的 rrr 应该是斜率

activations increase with the square-root of flops, parameters increase linearly, and runtime is best modeled using both a linear and a square-root term due to its dependence on both flops and activations.

横纵坐标比例不一样,所以看起来线性关系变弯了

3)RegNetX constrained

RegNetX Unconstrained 加上下面两个限制条件

  • set bbb = 1, d≤40d \leq 40d40, and wm≥2w_m \geq 2wm2
  • we limit parameters and activations,following Figure 12 (bottom).(感觉范围是卡在了 good,不可能是 best 吧,哈哈哈)

变成了 RegNetX Constrained

在这里插入图片描述在这里插入图片描述

4)Alternate design choices

在这里插入图片描述
在这里插入图片描述
左图可以看出,inverted bottleneck degrades the EDF slightly and depthwise conv performs even worse relative

中间图可以看出,a fixed resolution of 224×224 is best,

5)SE

X+SE as Y

图 14 右图可以看出,SE 还是蛮有效果的

5.3 Comparison to Existing Networks

先看看 RegNetX 和 RegNetY 的一些特点
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
higher flop models have a large number of blocks in the third stage and a small number of blocks in the last stage.(加上 stem 结构,也即 1/16 和 1/32,【FD-MobileNet】《FD-MobileNet:Improved MobileNet with a Fast Downsampling Strategy》 的优化符合此规律)

the group width ggg increases with complexity, but depth ddd saturates for large models.

1)State-of-the-Art Comparison: Mobile Regime
在这里插入图片描述
2)Standard Baselines Comparison: ResNe(X)t

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
RegNet 整体来说要比 ResNet 和 ResNext 要好一些

3)State-of-the-Art Comparison: Full Regime
在这里插入图片描述
在这里插入图片描述

low flops 的时候
flops 较小的时候, EfficientNet 比作者的方法猛,flops 上来后,RegNet 猛

RegNet 的一大优势是很快,训练推理

最后一栏 grayed 的结果是考虑了一些训练策略,如下
在这里插入图片描述
EfficientNet 还是猛呀

5.4 Appendix

1)Test Set Evaluation

在 ImageNet v2 数据集上验证下效果
在这里插入图片描述
趋势和 ImageNet 上一致

2)Additional Ablations

在这里插入图片描述
在这里插入图片描述

  • Fixed depth
    差不多

  • Fewer stages
    4 stage 比 3 stage 好

  • Inverted Bottleneck
    b < 1 degrades results further

  • Swish vs. ReLU
    在这里插入图片描述
    在这里插入图片描述
    图 20 中间的图可以看出,flops 比较小的时候,非 dw conv,Swish 比 ReLU 要好一些

    图 20 右边的图可以卡出,if ggg is restricted to be 1 (depthwise conv), Swish performs much better than ReLU

3)Optimization Settings
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

6 Conclusion(own) / Future work

  • widths and depths of good networks can be explained by a quantized linear function.

  • the depth of the best models is stable across compute regimes (~20 blocks) and that the best models do not use either a bottleneck or inverted bottleneck.

  • We highlight the improvements for fixed activations, which is of high practical interest as the number of activations can strongly influence the runtime on accelerators such as GPUs.

  • regime = flops

摘抄一些优秀的解读

《Designing Network Design Spaces》的整体解读(一篇更比六篇强)

在这里插入图片描述
在这里插入图片描述

批注:image resolution 的224->448 改变在文中是没有什么作用的

在这里插入图片描述

这个看 EfficientNet 的大哥把我逗笑了,哈哈哈,确实,efficientnet 在较小的 regime 上表现比 RegNet 的效果好(毕竟 AotoML 出来的,效果上还是杠杠的)

在这里插入图片描述

Backbone系列 - RegNet

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_10470.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

基于ssm的教资考前指导系统设计与实现-计算机毕业设计源码+LW文档

开发语言&#xff1a;Java 框架&#xff1a;ssm JDK版本&#xff1a;JDK1.8 服务器&#xff1a;tomcat7 数据库&#xff1a;mysql 5.7&#xff08;一定要5.7版本&#xff09; 数据库工具&#xff1a;Navicat11 开发软件&#xff1a;eclipse/myeclipse/idea Maven包&#xff1a;…

SuperMap海量影像瓦片最佳方案

写在前面的话&#xff1a;本文所宣传的高效生产影像地图瓦片方案在 SuperMap GIS 10i 版本已经提供&#xff0c;但之前只针对地理坐标系影像地图的全球剖分切片有效&#xff0c; SuperMap GIS 11i 版本打破了影像地图限制&#xff0c;对投影坐标系影像地图同样适用。另外&#…

路由跳转时的页面状态保存

前言 我们在开发网页时&#xff0c;经常会遇到一种情况——在一个页面对页面初始状态进行了修改&#xff08;如已请求到的数据、表单数据、滚动高度等等&#xff09;&#xff0c;跳转到另外一个页面之后再返回到原页面&#xff08;路由回退&#xff09;&#xff0c;原页面需要…

C++学习日记——宏函数和内联函数

学习目标 学习宏函数和内联函数的区别和使用 学习内容 宏函数&#xff1a; 使用宏定义定义出的函数&#xff0c;并不是真正意义上的函数 注意事项&#xff1a; 要保证运算的完整性 使用宏函数存在一定的缺陷 使用场景&#xff1a;频繁调用的短小的函数 优点&#xff1a; 不是…

总结:request获取当前请求路径以及各种参数的方法示例

总结&#xff1a;request获取当前请求路径以及各种参数的方法示例一Java代码中如何获取当前请求路径&#xff0c;以及参数的代码示例&#xff1a;二Java代码中如何获取当前请求路径&#xff0c;以及参数的结果示例&#xff1a;三关于request.getPathInfo() 方法的作用四获取req…

1. 开篇辞和一些SQL语句基本概念

目录 &#xff08;一&#xff09;前言 &#xff08;二&#xff09;SQL概述与历史发展 1. SQL的取名由来以及简述 2. SQL形成与发展的历史 3. SQL的用途 &#xff08;三&#xff09;关于RDBMS简介 &#xff08;一&#xff09;前言 写这个系列的想法在脑海中有一段时间了。其…

<Linux>进程控制

目录 一、进程创建 写实拷贝&#xff1a; 二、进程终止 三、进程等待 一、进程创建 描述一下&#xff0c;fork创建子进程&#xff0c;操作系统都做了什么&#xff1f; fork后父子进程是全部包括之前的代码都共享&#xff1b; fork创建子进程&#xff08;内核数据结构&#x…

【黑马程序员JVM学习笔记】02.内存结构

1.程序计数器 定义&#xff1a; Program Counter Register 程序计数器&#xff08;寄存器&#xff09; 作用&#xff1a; 记住下一条jvm指令的执行地址 getstatic #20 // PrintStream out System.out; astore_1 // -- aload_1 // out.print1n(1); i…

Zstack ZCCC学习笔记

ZCCC 云计算基础技术及解决方案 云计算基础概念 云计算交付方式分类 私有云&#xff1a;数据安全性高、IT基础架构可控制能力强、合规&#xff1b;公有云&#xff1a;初期投入成本低、弹性灵活&#xff1b;混合云&#xff1a;安全、合规、弹性、低成本。 服务模式分类 Ia…

文本检测DB net 实践

github 地址&#xff1a;GitHub - MhLiao/DB: A PyTorch implementation of "Real-time Scene Text Detection with Differentiable Binarization". 其他人的解析&#xff1a;DBNet阅读笔记 - 知乎 DB/DBNet&#xff1a;Real-time Scene Text Detection with Diffe…

未归一化导致Dead ReLU的悲剧

问题描述 笔者在参考http://zh.gluon.ai/chapter_deep-learning-basics/mlp-scratch.html 实现多层感知机的时候&#xff0c;遇到了一个问题 那就是&#xff0c;如果使用ReLU作为激活函数&#xff0c;模型的准确率非常低&#xff08;只有0.1&#xff09; 但是如果把那个网站上…

机器学习入门四

Octave相关资源官网地址下载地址相关语法运算符变量函数系统命令数据操作数据加载数据保存元素操作元素计算绘图和可视化工具绘图实例常用函数控制语句Octave相关资源 官网地址 官方地址 下载地址 下载地址 相关语法 运算符 %&#xff1a;注释~&#xff1a;表示不等于xo…

自学Python 62 使用urllib 包并获取百度搜索关键词中得到链接

Python 使用urllib 包 文章目录Python 使用urllib 包一、urllib 包介绍二、使用urllib.request模块三、使用urllib.parse模块在计算机网络模型中&#xff0c;Socket套接字编程属于底层网络协议开发的内容。虽然说编写网络程序需要从底层开始构建&#xff0c;但是自行处理相关协…

【图像分类】基于HOG特征结合SVM实现图像分类识别附matlab代码

1 内容介绍 ​为了满足人工智能在目标识别方法中的应用需求,需要具备对海量数据进行智能分类、识别、判读的能力.进一步挖掘了目标特性数据库数据,并将基于HOGSVM的目标识别算法应用于红外目标识别过程中.选择采集到的汽车、直升机、飞机、舰船、无人机等目标,并结合HOG算子与…

【Vite 实践】Vite 库模式能满足你吗?或许你需要统一构建

2022 年本人投入了 Vite 的怀抱&#xff0c;开始参与到 Vite 社区中&#xff0c;陆续开发了一些插件。 Vite 秉承了开箱即用&#xff0c;简化配置的思路&#xff0c;确实显著提升了前端开发体验。 但是在类库模式的构建上却有所欠缺&#xff0c;只能处理单个输入和单输入出的…

个人笔记--数据库理论 01 关系模型介绍——基于《数据库系统概念》第七版

关系模式 关系的例子 关系模型是目前广泛应用的数据模型由表的集合构成 例如 IDnamedpt_namesalary11111JAMCS12345 元组 tuple&#xff1a;表中的一行&#xff0c;元素无所谓属性 attribute : 原子的&#xff0c;不可再分的&#xff0c;要有属性域&#xff0c;如上表的nam…

云原生爱好者周刊:延迟加载任意 OCI 镜像 | 2022-09-13

开源项目推荐 SOCI Snapshotter SOCI Snapshotter 是一个 Containerd Snapshotter 插件&#xff0c;可以延迟加载任意 OCI 镜像&#xff0c;不需要 Stargz Snapshotter 一样构建特殊格式的镜像才能延迟加载。 Authentication Proxy 这个项目使用 YARP (Yet Another Reverse…

Git的认识和使用

目录 一、前置准备 二、git简介 三、gitee.com的基本使用 1.创建仓库(私库和公库) 2.创建文件及文件夹 新建文件夹两种方式 ①​ ② 3.删除 删除文件 删除仓库 四、组长组员的git使用 git clone 查看文件 git status git add git commit git push ## 命令行配置 多个…

葡聚糖-MAL/NHS/N3/Alkyne/SH/Biotin/CHO/OPSS/OH

产品名称&#xff1a; 葡聚糖-马来酰亚胺&#xff0c;葡聚糖-MAL&#xff0c;马来酰亚胺功能化葡聚糖 英文名称&#xff1a;Dextran-MAL PEG分子量可选&#xff1a;350,550,750,1k&#xff0c;2k&#xff0c;3.4k&#xff0c;5k&#xff0c;10k&#xff0c;20k&#xff08;可…

[仅需1步]企业微信群机器人[0基础接入][java]

[仅需1步]企业微信群机器人[0基础接入][java]背景介绍使用测试项目背景 公司需要把日常的服务器错误抛到企业微信群中,我正好记录下使用企业微信群机器人… 介绍 企业微信群机器人 应用介绍 企业微信是腾讯微信团队打造的企业通讯与办公工具&#xff0c;具有与微信一致的沟…