insightface icon indicating copy to clipboard operation
insightface copied to clipboard

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

Open king1111sadjfoisja opened this issue 1 year ago • 1 comments

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 avatar Jul 26 '24 07:07 king1111sadjfoisja

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!

king1111sadjfoisja avatar Jul 26 '24 07:07 king1111sadjfoisja