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

Pretraining checkpoint #17

Open
s1054020 opened this issue Mar 10, 2024 · 1 comment
Open

Pretraining checkpoint #17

s1054020 opened this issue Mar 10, 2024 · 1 comment

Comments

@s1054020
Copy link

After i trained,i put the .tar at vit_load_path.But i get the missing key error when i want to segment other data(like this:Missing key(s) in state_dict: "image_encoder.pos_embed", "image_encoder.patch_embed.proj.weight").Did i forget anything to do?thanks.

@LWHYC
Copy link
Collaborator

LWHYC commented Mar 19, 2024

After i trained,i put the .tar at vit_load_path.But i get the missing key error when i want to segment other data(like this:Missing key(s) in state_dict: "image_encoder.pos_embed", "image_encoder.patch_embed.proj.weight").Did i forget anything to do?thanks.
Sorry for the late reply. It seems like you need to extract the medlam weight from tar checkpoint and save it as pth. Then place them at medlam_load_path rather than the vit_load_path. I add a script python train/extract_weights.py -p train/checkpoint/your.tar to do this (change the tar path to your file). It will automatically extract the network weights from the checkpoint and save them as checkpoint/medlam.pth.

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