zkkli / RepQ-ViT

[ICCV 2023] RepQ-ViT: Scale Reparameterization for Post-Training Quantization of Vision Transformers
Apache License 2.0
102 stars 8 forks source link

AttributeError: 'Attention' object has no attribute 'reduction' #3

Open Arthur-Ling opened 9 months ago

Arthur-Ling commented 9 months ago

When I try to run the code, there is a problem in line 117 of test_quant.py "next_module = father_module.reduction". my shell is "python test_quant.py --model deit_small --dataset /root/data/Imagenet". Is there any problem with my shell?

zkkli commented 9 months ago

Hi,

There is no problem with your shell.

If your model is deit, you should access line112 ('norm1') or 114 ('norm2'). My suggestion is to check if the model is loaded correctly, or you can try to change the version of timm (my version is 0.4.12).