deepinsight / deepinsight/insightface
Which folder should I put the pretrained model dml_str_lapa.pth in?
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
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]).
```

This demonstrates the folder information within my project.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with test.py and the reported --restore-from command, then compare the checkpoint's 11-channel layer6.conv4 tensors with the model configured for --num-classes 19. Check how the project expects pretrained files such as dml_csr_lapa.pth or dml_str_lapa.pth to be located; done means the compatible path and model configuration are clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100