Transformer is a new kind of neural architecture which encodes the input data as powerful features via the attention mechanism. Basically, the visual transformers first divide the input images into several local patches and then calculate both representations and their relationship. Since natural images are of high complexity with abundant detail and color information, the granularity of the patch dividing is not fine enough for excavating features of objects in different scales and locations. In this paper, we point out that the attention inside these local patches are also essential for building visual transformers with high performance and we explore a new architecture, namely, Transformer iN Transformer (TNT). Specifically, we regard the local patches (e.g., 16$\times$16) as "visual sentences" and present to further divide them into smaller patches (e.g., 4$\times$4) as "visual words". The attention of each word will be calculated with other words in the given visual sentence with negligible computational costs. Features of both words and sentences will be aggregated to enhance the representation ability. Experiments on several benchmarks demonstrate the effectiveness of the proposed TNT architecture, e.g., we achieve an 81.5% top-1 accuracy on the ImageNet, which is about 1.7% higher than that of the state-of-the-art visual transformer with similar computational cost. The PyTorch code is available at https://github.com/huawei-noah/CV-Backbones, and the MindSpore code is available at https://gitee.com/mindspore/models/tree/master/research/cv/TNT.


翻译:变形器是一种新型的神经结构, 它通过关注机制将输入数据编码为强大的功能。 基本上, 视觉变压器首先将输入图像分割成几个本地的补丁, 然后计算其表达式和关系。 由于自然图像非常复杂, 细节和颜色信息丰富, 修压器的颗粒性不足以在不同的尺度和地点挖掘物体的特性。 在本文中, 我们指出, 这些本地补丁内部的注意对于建设具有高性能的视觉变压器也是必不可少的, 我们探索一个新的结构, 即 变压器 iN变压器( TNT)。 具体地说, 我们把本地的补丁( 如, 16 $\ times 16) 视为“ 视觉句子 ”, 并将其进一步分为较小的补丁( 例如, 4 $\ timets 4) 。 每个词的注意将用给定的视觉句中的其他词来计算, 且计算成本微小的计算。 两个单词和句的精度将用来增强代表能力。 。 在几个基准上进行实验时, 将显示 TNTE / treal/ sreal 的变形/ devely- sal deal deal deal is the fal deal deal sal is the sal_ deal sal

11
下载
关闭预览

相关内容

【PAISS 2021 教程】概率散度与生成式模型,92页ppt
专知会员服务
32+阅读 · 2021年11月30日
【Tutorial】计算机视觉中的Transformer,98页ppt
专知会员服务
139+阅读 · 2021年10月25日
【CVPR 2021】变换器跟踪TransT: Transformer Tracking
专知会员服务
21+阅读 · 2021年4月20日
【CVPR2021】用Transformers无监督预训练进行目标检测
专知会员服务
55+阅读 · 2021年3月3日
最新《Transformers模型》教程,64页ppt
专知会员服务
274+阅读 · 2020年11月26日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
97+阅读 · 2020年8月30日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
56+阅读 · 2019年10月17日
ExBert — 可视化分析Transformer学到的表示
专知会员服务
30+阅读 · 2019年10月16日
Transformer中的相对位置编码
AINLP
5+阅读 · 2020年11月28日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
Arxiv
39+阅读 · 2021年11月11日
Arxiv
102+阅读 · 2021年6月8日
Arxiv
17+阅读 · 2021年3月29日
Arxiv
3+阅读 · 2021年2月16日
Arxiv
19+阅读 · 2020年12月23日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
VIP会员
相关VIP内容
【PAISS 2021 教程】概率散度与生成式模型,92页ppt
专知会员服务
32+阅读 · 2021年11月30日
【Tutorial】计算机视觉中的Transformer,98页ppt
专知会员服务
139+阅读 · 2021年10月25日
【CVPR 2021】变换器跟踪TransT: Transformer Tracking
专知会员服务
21+阅读 · 2021年4月20日
【CVPR2021】用Transformers无监督预训练进行目标检测
专知会员服务
55+阅读 · 2021年3月3日
最新《Transformers模型》教程,64页ppt
专知会员服务
274+阅读 · 2020年11月26日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
97+阅读 · 2020年8月30日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
56+阅读 · 2019年10月17日
ExBert — 可视化分析Transformer学到的表示
专知会员服务
30+阅读 · 2019年10月16日
相关资讯
Transformer中的相对位置编码
AINLP
5+阅读 · 2020年11月28日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
Hierarchical Disentangled Representations
CreateAMind
4+阅读 · 2018年4月15日
最佳实践:深度学习用于自然语言处理(三)
待字闺中
3+阅读 · 2017年8月20日
【学习】Hierarchical Softmax
机器学习研究会
4+阅读 · 2017年8月6日
相关论文
Arxiv
39+阅读 · 2021年11月11日
Arxiv
102+阅读 · 2021年6月8日
Arxiv
17+阅读 · 2021年3月29日
Arxiv
3+阅读 · 2021年2月16日
Arxiv
19+阅读 · 2020年12月23日
Star-Transformer
Arxiv
5+阅读 · 2019年2月28日
The Evolved Transformer
Arxiv
5+阅读 · 2019年1月30日
Music Transformer
Arxiv
5+阅读 · 2018年12月12日
Top
微信扫码咨询专知VIP会员