当前位置:网站首页>深度学习——Patches Are All You Need
深度学习——Patches Are All You Need
2022-07-28 05:22:00 【菜到怀疑人生】
前言
这篇文章目前投递至ICLR 2022,暂无发表记录。
自从2020年ViT问世以来,关于transformer的文章层出不穷,ViT有如此良好的性能,是因为其独特的网络结构,还是因为其独特的输入形式?这篇文章设计了ConvMixer网络,验证了ViT的良好性能可能来源于其独特的输入形式。
本文将会简单介绍ConvMixer网络的结构,并简单总结由ViT引出的几个设计网络结构的思路,最后会简单谈谈我对这篇文章的看法。
ConvMixer的结构

和ViT类似,ConvMixer会将输入图像切割成几个不重合的patch,每个patch的大小为 p ∗ p p * p p∗p,接着经过 h h h个kernel size为 p ∗ p p * p p∗p,步伐数为 p p p的卷积处理,得到一个大小为 h ∗ n / p ∗ n / p h * n/p * n/p h∗n/p∗n/p的feature map,这个过程就是ViT中的patch embedding(patch embedding本身可以等价于上述操作)。
接着数据会经过 d d d层ConvMixier Layer处理,Depthwise Convolution模拟了MLP mixer中的spatial mixing,用于糅合空间信息,Pointwise Convolution模拟了MLP mixer中的channel-wise mixing,用于糅合通道信息。ConvMixier Layer并不会进行下采样,不同层输出的feature map的resolution和channel数都是一致的。
最后一层输出的feature map会经过一个全局池化处理,输入到一个分类器中进行分类
论文做的实验不多,本文给出ImageNet 1k上的实验结果。ConvMixer-1536/20表示feature map的channel数为1536,网络深度为20,其他以此类推
可以看到,ConvMixer-1536/20的性能要优于朴素的Mixer-B/16,并且参数量要更少
设计网络结构的一些思路
ViT问世后,出现了一类Isotropic architectures,即首先使用patch embeddings,不同层输出的feature map的channel和resolution完全一致,类似于本文提出的ConvMixer。
目前也有一部分工作,将ViT与CNN结合。
思考
这篇文章和MLP mixer很类似,而MLP mixer中的许多操作本身可以等价于Depthwise Convolution和Pointwise Convolution,模型结构上没有太多不同。
作者设计的ConvMixer包含ViT中的两个因素,Isotropic和patch embedding,文章并没有论述这两个因素究竟谁对性能的影响大,patch embedding的实质就是用大的卷积核对输入图像进行卷积,那么是不是可以在ResNet中引入patch embedding,如果模型性能有所提升,那ViT的性能很可能来源于其独特的输入形式,在一定程度上更符合论文标题。
边栏推荐
- Spark中的Structured Streaming
- 【1】 Introduction to redis
- 小程序开发
- 搭建集群之后崩溃的解决办法
- Sqlalchemy usage related
- How digital library realizes Web3.0 social networking
- tensorboard可视化
- Distinguish between real-time data, offline data, streaming data and batch data
- On July 7, the national wind 24 solar terms "Xiaoshu" came!! Attachment.. cooperation.. completion.. advance.. report
- Quick look-up table to MD5
猜你喜欢

Micro service architecture cognition and service governance Eureka

Linux(centOs7) 下安装redis

Kotlin语言现在怎么不火了?你怎么看?

分布式集群架构场景优化解决方案:Session共享问题

服务可靠性保障-watchdog

【五】redis主从同步与Redis Sentinel(哨兵)

小程序开发要多少钱?两种开发方法分析!

微信小程序开发制作注意这几个重点方面

深度学习(自监督:CPC v2)——Data-Efficient Image Recognition with Contrastive Predictive Coding

Self attention learning notes
随机推荐
MySQL trigger
Kubesphere installation version problem
微信小程序制作模板套用时需要注意什么呢?
On July 7, the national wind 24 solar terms "Xiaoshu" came!! Attachment.. cooperation.. completion.. advance.. report
ModuleNotFoundError: No module named ‘pip‘
How digital library realizes Web3.0 social networking
Hit your face ins? Mars digital collection platform explores digital collection light social networking
【6】 Redis cache policy
Interface anti duplicate submission
The business of digital collections is not so easy to do
pytorch深度学习单卡训练和多卡训练
使用pyhon封装一个定时发送邮件的工具类
搭建集群之后崩溃的解决办法
小程序开发
How to use Bert
Sqlalchemy usage related
ModuleNotFoundError: No module named ‘pip‘
On how digital collections and entities can empower each other
Sort method for sorting
Briefly understand MVC and three-tier architecture