Transformer in Transformer

变压器 计算机科学 建筑 判决 人工智能 粒度 程序设计语言 工程类 电气工程 艺术 电压 视觉艺术
作者
Kai Han,An Xiao,Enhua Wu,Jianyuan Guo,Chunjing Xu,Yunhe Wang
出处
期刊:Cornell University - arXiv 被引量:861
标识
DOI:10.48550/arxiv.2103.00112
摘要

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.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
更新
PDF的下载单位、IP信息已删除 (2025-6-4)

科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
行7发布了新的文献求助10
刚刚
无花果应助呆萌的紫霜采纳,获得10
1秒前
Johnathan完成签到,获得积分10
1秒前
haofan17完成签到,获得积分0
2秒前
殷勤的雨完成签到 ,获得积分10
2秒前
酷波er应助霸气白卉采纳,获得30
3秒前
贤惠的伟泽完成签到,获得积分10
4秒前
4秒前
王娇完成签到 ,获得积分10
4秒前
科研通AI6应助科研通管家采纳,获得10
4秒前
深情安青应助科研通管家采纳,获得30
5秒前
上官若男应助科研通管家采纳,获得10
5秒前
SciGPT应助科研通管家采纳,获得10
5秒前
子车茗应助科研通管家采纳,获得20
5秒前
我是老大应助科研通管家采纳,获得10
5秒前
领导范儿应助科研通管家采纳,获得10
5秒前
DijiaXu应助科研通管家采纳,获得10
5秒前
SciGPT应助科研通管家采纳,获得10
5秒前
英俊的铭应助科研通管家采纳,获得10
5秒前
Jasper应助科研通管家采纳,获得10
6秒前
DijiaXu应助科研通管家采纳,获得10
6秒前
乐乐应助科研通管家采纳,获得200
6秒前
香蕉觅云应助科研通管家采纳,获得10
6秒前
FashionBoy应助科研通管家采纳,获得10
6秒前
yiding完成签到 ,获得积分10
6秒前
桐桐应助科研通管家采纳,获得10
6秒前
CodeCraft应助科研通管家采纳,获得10
6秒前
浮游应助科研通管家采纳,获得10
6秒前
隐形曼青应助科研通管家采纳,获得50
6秒前
6秒前
ding应助Yang_728采纳,获得10
7秒前
义气的友容完成签到,获得积分10
7秒前
量子星尘发布了新的文献求助10
8秒前
8秒前
lujiexu完成签到,获得积分10
9秒前
9秒前
9秒前
克林完成签到,获得积分20
9秒前
英姑应助zhou采纳,获得10
11秒前
Overtone发布了新的文献求助10
11秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Acute Mountain Sickness 2000
A novel angiographic index for predicting the efficacy of drug-coated balloons in small vessels 500
Textbook of Neonatal Resuscitation ® 500
Thomas Hobbes' Mechanical Conception of Nature 500
The Affinity Designer Manual - Version 2: A Step-by-Step Beginner's Guide 500
Affinity Designer Essentials: A Complete Guide to Vector Art: Your Ultimate Handbook for High-Quality Vector Graphics 500
热门求助领域 (近24小时)
化学 医学 生物 材料科学 工程类 有机化学 内科学 生物化学 物理 计算机科学 纳米技术 遗传学 基因 复合材料 化学工程 物理化学 病理 催化作用 免疫学 量子力学
热门帖子
关注 科研通微信公众号,转发送积分 5097188
求助须知:如何正确求助?哪些是违规求助? 4309756
关于积分的说明 13428112
捐赠科研通 4137185
什么是DOI,文献DOI怎么找? 2266508
邀请新用户注册赠送积分活动 1269609
关于科研通互助平台的介绍 1205917