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/tree/master/tnt_pytorch, and the MindSpore code is at https://gitee.com/mindspore/mindspore/tree/master/model_zoo/research/cv/TNT.


翻译:变形器是一种新型的神经结构, 通过关注机制将输入数据编码为强大的功能。 基本上, 视觉变压器首先将输入图像分解为几个本地补丁, 然后计算其表达方式和关系。 由于自然图像复杂, 细节和颜色信息丰富, 修压器的颗粒性不足以在不同的尺度和地点挖掘物体的特性。 在本文中, 我们指出, 这些本地补丁内部的注意对于建设具有高性能的视觉变压器也是必不可少的, 我们探索一个新的架构, 即 变换器 iN变压器/ 变压器( TNT)。 具体地说, 我们把本地补丁( 如, 16$\ times 16) 视为“ 视觉句子”, 并将其进一步分为更小的补丁( 如, 4美元\ timets 4) 。 每个字的注意将用给定的视觉句中的其他字来计算, 可忽略的计算成本。 两字和句的精度都将归为增强代表能力。 。 在几个基准上进行实验时, TNT/ NS 的变压/ 直流/ 直径/ 直径 的计算, 直径/ 的精度 结构的精度为: 的精度, 我们的精度为最高的精确度为8- 。

3
下载
关闭预览

相关内容

专知会员服务
30+阅读 · 2021年7月30日
专知会员服务
46+阅读 · 2021年6月1日
Transformer替代CNN?8篇论文概述最新进展!
专知会员服务
77+阅读 · 2021年1月19日
最新《Transformers模型》教程,64页ppt
专知会员服务
326+阅读 · 2020年11月26日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
108+阅读 · 2020年8月30日
专知会员服务
16+阅读 · 2020年7月27日
【伯克利】再思考 Transformer中的Batch Normalization
专知会员服务
41+阅读 · 2020年3月21日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Transformer中的相对位置编码
AINLP
5+阅读 · 2020年11月28日
【Reformer】图解Reformer:一种高效的Transformer
深度学习自然语言处理
6+阅读 · 2020年3月9日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
进一步改进GPT和BERT:使用Transformer的语言模型
机器之心
16+阅读 · 2019年5月1日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
Arxiv
0+阅读 · 2021年9月6日
Arxiv
17+阅读 · 2021年3月29日
Arxiv
9+阅读 · 2021年2月8日
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会员
最新内容
无人机自主控制与人工智能:系统性综述
专知会员服务
6+阅读 · 今天7:25
巡飞弹与反无人机系统——现代战场的两大支柱
专知会员服务
2+阅读 · 今天6:54
《打造“黄金舰队”》57页报告
专知会员服务
1+阅读 · 今天6:52
《北约数字教官网络发展路径》128页报告
专知会员服务
1+阅读 · 今天6:33
ECCV 2026 | MIMFlow:MIM与归一化流统一图像生成
专知会员服务
6+阅读 · 6月25日
网状网络及其在军事领域的运用
专知会员服务
7+阅读 · 6月25日
无美国参与的欧洲战争方式(万字长文)
专知会员服务
8+阅读 · 6月25日
《国防领域敏感性分析白皮书》
专知会员服务
9+阅读 · 6月25日
综述 | 从问答到任务完成:Agent系统与Harness设计
专知会员服务
10+阅读 · 6月24日
Agentic RL:框架、实践与长程智能体训练
专知会员服务
10+阅读 · 6月24日
相关VIP内容
专知会员服务
30+阅读 · 2021年7月30日
专知会员服务
46+阅读 · 2021年6月1日
Transformer替代CNN?8篇论文概述最新进展!
专知会员服务
77+阅读 · 2021年1月19日
最新《Transformers模型》教程,64页ppt
专知会员服务
326+阅读 · 2020年11月26日
Transformer模型-深度学习自然语言处理,17页ppt
专知会员服务
108+阅读 · 2020年8月30日
专知会员服务
16+阅读 · 2020年7月27日
【伯克利】再思考 Transformer中的Batch Normalization
专知会员服务
41+阅读 · 2020年3月21日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
相关资讯
Transformer中的相对位置编码
AINLP
5+阅读 · 2020年11月28日
【Reformer】图解Reformer:一种高效的Transformer
深度学习自然语言处理
6+阅读 · 2020年3月9日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
BERT/Transformer/迁移学习NLP资源大列表
专知
19+阅读 · 2019年6月9日
进一步改进GPT和BERT:使用Transformer的语言模型
机器之心
16+阅读 · 2019年5月1日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
相关论文
Arxiv
0+阅读 · 2021年9月6日
Arxiv
17+阅读 · 2021年3月29日
Arxiv
9+阅读 · 2021年2月8日
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会员