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
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()
Model | # of Params |
TransCNN-Small | 13.91M |
TransCNN-Base | 25.94M |
@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