Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- ubuntu
- dlib
- dataset
- keras
- python
- gpu memory
- download
- error
- TensorFlow
- YouTube 8M
- object detection
- Anaconda
- CUDA
- urllib
- linux
- Deep Learning
- Jupyter notebook
- FIle
- windows
- colaboratory
- colab
- install
- 딥러닝
- Windows 10
- shakeratos
- raspberry pi
- ppc64le
- face_recognition
- python3
- pyTorch
Archives
- Today
- Total
Shakerato
pytorch load pre-trained model, Missing key(s) in state_dict 본문
In Pytorch
Error
'Missing key(s) in state_dict' when loading pre-trained model (state_dict())
Reason
In training stage, Use DataParallel for multi gpu usage
In testing stage, Don't use DataParallel
Solution
1. In testing stage, Use DataParallel
2. In testing stage, model.load_state_dict(torch.load(path), strict=False)
'Research' 카테고리의 다른 글
mosh server-client as SSH, fast (0) | 2019.10.11 |
---|---|
slow texting through ssh (0) | 2019.10.10 |
Nvidia Driver and CUDA install on ppc64le Ubuntu (0) | 2019.10.07 |
apt-get error 'Couldn't create temporary file ...' (0) | 2019.10.07 |
리눅스 한글 문제 해결 ('ascii' codec can't encode characters) (0) | 2019.08.19 |