yitu-opensource / T2T-ViT

ICCV2021, Tokens-to-Token ViT: Training Vision Transformers from Scratch on ImageNet
Other
1.14k stars 177 forks source link

'bool' object has no attribute 'pos_embed #67

Open helloworld-wu opened 2 years ago

helloworld-wu commented 2 years ago

image When I want to use the pretrained model, I got a problem likes this. Could you tell me how to slove it? Thanks!

xmy0916 commented 2 years ago

把这行改成https://github.com/yitu-opensource/T2T-ViT/blob/main/utils.py#L83

state_dict = load_state_dict(checkpoint_path, model, use_ema, num_classes)

就行了 @helloworld-wu

helloworld-wu commented 2 years ago

把这行改成https://github.com/yitu-opensource/T2T-ViT/blob/main/utils.py#L83

state_dict = load_state_dict(checkpoint_path, model, use_ema, num_classes)

就行了 @helloworld-wu

谢谢!