SHI-Labs / Compact-Transformers

Escaping the Big Data Paradigm with Compact Transformers, 2021 (Train your Vision Transformers in 30 mins on CIFAR-10 with a single GPU!)
https://arxiv.org/abs/2104.05704
Apache License 2.0
495 stars 77 forks source link

AttributeError: 'TransformerClassifier' object has no attribute 'num_tokens' #53

Closed XiaominLi1997 closed 2 years ago

XiaominLi1997 commented 2 years ago

Hello, I got the error "AttributeError: 'TransformerClassifier' object has no attribute 'num_tokens'" when I use cct_7_7x2_224_sine and set pretrained=True

alihassanijr commented 2 years ago

Hello there, Thank you for reporting this. I'll start a PR to get this fixed.

alihassanijr commented 2 years ago

Can you confirm whether it's fixed now @XiaominLi1997

XiaominLi1997 commented 2 years ago

Hello, thanks for your modification, but there are still some errors, that is, mismatched params. image

alihassanijr commented 2 years ago

Are you modifying the image size? Can I see your run command?

XiaominLi1997 commented 2 years ago

Are you modifying the image size? Can I see your run command? Yep, I use image size 128x128. image

alihassanijr commented 2 years ago

I see. The latest merge should fix the issue.

XiaominLi1997 commented 2 years ago

I see. The latest merge should fix the issue.

Thx.