Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在finetune时报错KeyError: 'optimizer' #300

Open
wrtppp opened this issue Apr 18, 2024 · 1 comment
Open

在finetune时报错KeyError: 'optimizer' #300

wrtppp opened this issue Apr 18, 2024 · 1 comment

Comments

@wrtppp
Copy link

wrtppp commented Apr 18, 2024

部分报错
...
2024-04-18,21:54:45 | INFO | Rank 0 | valid_step_interval: 150
2024-04-18,21:54:45 | INFO | Rank 0 | vision_model: ViT-B-16
2024-04-18,21:54:45 | INFO | Rank 0 | warmup: 100
2024-04-18,21:54:45 | INFO | Rank 0 | wd: 0.001
2024-04-18,21:54:45 | INFO | Rank 0 | world_size: 1
2024-04-18,21:54:45 | INFO | Rank 0 | Use GPU: 0 for training
2024-04-18,21:54:45 | INFO | Rank 0 | => begin to load checkpoint '/home/ppop/Chinese-CLIP/datapath/pretrained_weights/clip_cn_vit-b-16.pt'
2024-04-18,21:54:46 | INFO | Rank 0 | train LMDB file contains 35000 images and 105000 pairs.
2024-04-18,21:54:46 | INFO | Rank 0 | val LMDB file contains 7500 images and 22500 pairs.
Traceback (most recent call last):
File "cn_clip/training/main.py", line 350, in
main()
File "cn_clip/training/main.py", line 231, in main
optimizer.load_state_dict(checkpoint["optimizer"])
KeyError: 'optimizer'
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/ppop/miniconda3/envs/torch/lib/python3.8/threading.py", line 932, in _bootstrap_inner

@swrrrrrrr
Copy link

你好,请问这个问题解决了吗?怎么解决的?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants