Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.2 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.2 KB

Transformer in Convolutional Neural Networks

Unofficial toy implementation for Transformer in Convolutional Neural Networks. There are many ambiguous points in the paper, so implementation may differ a lot from the original paper and I only get models for 256 x 256 inputs.

Paper: https://arxiv.org/abs/2106.03180

Import

from model import TransCNN_Model

num_classes = 1000
in_channels = 3
input_size = 256 

small_model = TransCNN_Model(num_classes, in_channels = in_channels, type = 'small').cuda()

Number of Params

Model # of Params
TransCNN-Small 13.91M
TransCNN-Base 25.94M

Citation

@misc{liu2021transformer,
  title={Transformer in Convolutional Neural Networks}, 
  author={Yun Liu and Guolei Sun and Yu Qiu and Le Zhang and Ajad Chhatkuli and Luc Van Gool},
  year={2021},
  eprint={2106.03180},
  archivePrefix={arXiv},
  primaryClass={cs.CV}}

Veni,vidi,vici --Caesar