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

for visualization problems #10

Open
wefwefWEF2 opened this issue Dec 19, 2023 · 0 comments
Open

for visualization problems #10

wefwefWEF2 opened this issue Dec 19, 2023 · 0 comments

Comments

@wefwefWEF2
Copy link

Thanks a lot for the great job!

I have some problems about visualization.
When I use
python visualize.py --config-file configs/cub.yaml OUTPUT_DIR /home/user/Downloads/TOAST-main/output MODEL.MODEL_ROOT /home/user/Downloads/TOAST-main/model/vit_b_bottom_up.pth MODEL.TEST_WEIGHT_PATH /home/user/Downloads/TOAST-main/output/CUB/vit_fb_ppt_small_patch16_224/lr0.01_wd0.0005/run4/test_CUB_logits_1.pth DATA.DATAPATH //home/user/Downloads/TOAST-main/visual_classification/src/data/datasets/CUB_200_2011/CUB_200_2011/

it shows AssertionError: Model type 'ssl-vit' not supported

But when I try to change type 'ssl-vit' to "vit_bottom_up" in cub.yaml, it works, but still can not load the model here, and shows key error

try:
model.load_state_dict(torch.load(cfg.MODEL.TEST_WEIGHT_PATH)["model"], strict=True)
except:
model.load_state_dict(torch.load(cfg.MODEL.TEST_WEIGHT_PATH)["model_state_dict"], strict=True)

and i check the keys in model, there are only dict_keys(['targets', 'joint_logits'])

How can I visualize it and load the model correctly?

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

1 participant