SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2103.16302 · ICCV · 2021

Rethinking Spatial Dimensions of Vision Transformers

Seong Oh, Sanghyuk Chun, Sangdoo Yun, Dongyoon Han, Junsuk Choe, Byeongho Heo

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 20 functions out of this paper's own repositories and ran 10 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
ahmedelmahy/myownvit — 7 of 7
naver-ai/pflayer — 2 of 4
ttt496/vit-pytorch — 1 of 1
conceptofmind/PiT-flax — 0 of 5
naver-ai/pit — 0 of 3
FunctionStatusWhere it lives
Attention Ran ahmedelmahy/myownvit/vit_pytorch/pit.py
code served (permissive licence) · get_code("208dc760722cfcfa")
DepthWiseConv2d Ran ahmedelmahy/myownvit/vit_pytorch/pit.py
code served (permissive licence) · get_code("b69c80fb1e5cf629")
EffLayer Ran naver-ai/pflayer/pit_pf.py
code served (permissive licence) · get_code("f7fb77ac6df06842")
PiT Ran ahmedelmahy/myownvit/vit_pytorch/pit.py
code served (permissive licence) · get_code("caf68598442aada3")
PiT Ran ttt496/vit-pytorch/vit_pytorch/pit.py
code served (permissive licence) · get_code("6211052f6649e259")
Pool Ran ahmedelmahy/myownvit/vit_pytorch/pit.py
code served (permissive licence) · get_code("c79e0963e1847801")
Transformer Ran ahmedelmahy/myownvit/vit_pytorch/pit.py
code served (permissive licence) · get_code("4d312a2f86b14d9c")
cast_tuple Ran ahmedelmahy/myownvit/vit_pytorch/pit.py
code served (permissive licence) · get_code("5c1da0fe7a052b06")
conv_embedding Ran naver-ai/pflayer/pit_pf.py
code served (permissive licence) · get_code("3a3ce506fe421f4b")
conv_output_size Ran ahmedelmahy/myownvit/vit_pytorch/pit.py
code served (permissive licence) · get_code("cc07f242a3837d36")
Attention Not yet run conceptofmind/PiT-flax/pit.py
code served (permissive licence) · get_code("285deef776e40994")
DepthWiseConv2d Not yet run conceptofmind/PiT-flax/pit.py
code served (permissive licence) · get_code("5be8ba6da0864b0d")
PiT Not yet run conceptofmind/PiT-flax/pit.py
code served (permissive licence) · get_code("c8b68f995be04853")
Pool Not yet run conceptofmind/PiT-flax/pit.py
code served (permissive licence) · get_code("c3afc53a158bdfd4")
PoolingTransformer Not yet run naver-ai/pflayer/pit_pf.py
code served (permissive licence) · get_code("7edb1435932874d2")
PoolingTransformer Not yet run naver-ai/pit/pit.py
code served (permissive licence) · get_code("5bffd5e28b70b242")
Transformer Not yet run naver-ai/pflayer/pit_pf.py
code served (permissive licence) · get_code("e1427b6eba7bf4f3")
Transformer Not yet run conceptofmind/PiT-flax/pit.py
code served (permissive licence) · get_code("b8a78469cccd6045")
Transformer Not yet run naver-ai/pit/pit.py
code served (permissive licence) · get_code("87fd352d6ad6c2d7")
conv_head_pooling Not yet run naver-ai/pit/pit.py
code served (permissive licence) · get_code("6e37ff319742476c")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Vision Transformer (ViT) extends the application range of transformers from language processing to computer vision tasks as being an alternative architecture against the existing convolutional neural networks (CNN). Since the transformer-based architecture has been innovative for computer vision modeling, the design convention towards an effective architecture has been less studied yet. From the successful design principles of CNN, we investigate the role of spatial dimension conversion and its effectiveness on transformer-based architecture. We particularly attend to the dimension reduction principle of CNNs; as the depth increases, a conventional CNN increases channel dimension and decreases spatial dimensions. We empirically show that such a spatial dimension reduction is beneficial to a transformer architecture as well, and propose a novel Pooling-based Vision Transformer (PiT) upon the original ViT model. We show that PiT achieves the improved model capability and generalization performance against ViT. Throughout the extensive experiments, we further show PiT outperforms the baseline on several tasks such as image classification, object detection, and robustness evaluation. Source codes and ImageNet models are available at https://github.com/naver-ai/pit.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2103.16302")
get_code_for_paper("2103.16302")
have("2103.16302")

Connect an agent — have() is free.