YuchenLiu98 / ECCV2022-SDA-FAS

Source-Free Domain Adaptation with Contrastive Domain Alignment and Self-supervised Exploration for Face Anti-Spoofing, ECCV2022
MIT License
19 stars 2 forks source link

checkpoint problem #1

Closed yic666 closed 2 years ago

yic666 commented 2 years ago

When I run test_SDAFAS.py in O_M_I_to_C,I encountered an error. RuntimeError: Error(s) in loading state_dict for VisionTransformer: size mismatch for pos_embed: copying a param with shape torch.Size([1, 257, 384]) from checkpoint, the shape in current model is torch.Size([1, 197, 384]).

YuchenLiu98 commented 2 years ago

For vision_transformer.py in timm, change the image_size from default 224 to 256.