Skip to content

Toy implementation of TransCNN: Transformer in Convolutional Neural Networks

License

Notifications You must be signed in to change notification settings

yuranusduke/TransCNN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Toy implementation of TransCNN: Transformer in Convolutional Neural Networks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages