deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
23.19k stars 5.39k forks source link

Which folder should I put the pretrained model dml_str_lapa.pth in? #2620

Open king1111sadjfoisja opened 2 months ago

king1111sadjfoisja commented 2 months ago

Dear Author: Thank you for open-source such a great work! When testing pretrained models,I encountered the following problems: After downloading dml_csr_lapa.pth,I have no idea which folder in my project to put in,so I creat a folder named snapshots and ran the folowing command:

python test.py --data-dir ./dataset/NeRSemble/ --out-dir ./output/ --restore-from ./snapshots/dml_csr_lapa.pth --gpu 0 --batch-size 7 --input-size 473,473 --dataset test --n
um-classes 19

Program error:

RuntimeError: Error(s) in loading state_dict for DML_CSR:
        size mismatch for layer6.conv4.weight: copying a param with shape torch.Size([11, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([19, 256, 1, 1]).
        size mismatch for layer6.conv4.bias: copying a param with shape torch.Size([11]) from checkpoint, the shape in current model is torch.Size([19]).

image This demonstrates the folder information within my project.

king1111sadjfoisja commented 2 months ago

I d like to know how I can fix this problem and how to test pretrained model(which folder should i put dml_csr_lapa.pth in ?) Thanks a lot!