Open LvRenbaba opened 4 months ago
I have the same problem. If you have an idea, can you tell me? thank you
You can refer to scripts/cmpa/main.sh, and add these cfg keys.
You can refer to scripts/cmpa/main.sh, and add these cfg keys.
here is my manual runing code: python train.py --root /home/lvren/CMPA/CMPA/data --seed 1 --trainer CMPA --dataset-config-file /home/lvren/CMPA/CMPA/configs/datasets/caltech101.yaml --config-file /home/lvren/CMPA/CMPA/configs/trainers/CMPA/vit_b16_c2_ep20_batch4_16ctx.yaml --output-dir /home/lvren/CMPA/CMPA/output/caltech/4shots/seed1 TRAINER.CMPA.PROMPT_DEPTH 9 TRAINER.CMPA.FUSING mean TRAINER.CMPA.PS True DATASET.NUM_SHOTS 4 DATASET.SUBSAMPLE_CLASSES all but the same error happened.
python train.py --root /home/lvren/CMPA/CMPA/data --seed 1 --trainer CMPA --dataset-config-file /home/lvren/CMPA/CMPA/configs/datasets/caltech101.yaml --config-file /home/lvren/CMPA/CMPA/configs/trainers/CMPA/vit_b16_c2_ep20_batch4_16ctx.yaml --output-dir /home/lvren/CMPA/CMPA/output/caltech/4shots/seed1 TRAINER.CMPA.PROMPT_DEPTH 9 TRAINER.CMPA.FUSING mean TRAINER.CMPA.PS True DATASET.NUM_SHOTS 4 DATASET.SUBSAMPLE_CLASSES all
Namespace(root='/home/lvren/CMPA/CMPA/data', output_dir='/home/lvren/CMPA/CMPA/output/caltech/4shots/seed1', resume='', seed=1, source_domains=None, target_domains=None, transforms=None, config_file='/home/lvren/CMPA/CMPA/configs/tr
ainers/CMPA/vit_b16_c2_ep20_batch4_16ctx.yaml', dataset_config_file='/home/lvren/CMPA/CMPA/configs/datasets/caltech101.yaml', trainer='CMPA', backbone='', head='', eval_only=False, model_dir='', load_epoch=None, no_train=False, opts=['TRAINER.CMPA.PROMPT_DEPTH', '9', 'TRAINER.CMPA.FUSING', 'mean', 'TRAINER.CMPA.PS', 'True', 'DATASET.NUM_SHOTS', '4', 'DATASET.SUBSAMPLE_CLASSES', 'all'])
Traceback (most recent call last):
File "/home/lvren/CMPA/CMPA/train.py", line 199, in
(CMPA) lvren@DESKTOP-2YB812V:~/CMPA/CMPA$ python train.py --root /home/lvren/CMPA/CMPA/data --seed 1 --trainer CMPA --dataset-config-file /home/lvren/CMPA/CMPA/configs/datasets/caltech101.yaml --config-file /home/lvren/CMPA/CMPA/co
nfigs/trainers/CMPA/vit_b16_c2_ep20_batch4_16ctx.yaml --output-dir /home/lvren/CMPA/CMPA/output/caltech/4shots/seed1 TRAINER.CMPA.PROMPT_DEPTH 9 TRAINER.CMPA.PS True DATASET.NUM_SHOTS 4 DATASET.SUBSAMPLE_CLASSES all
Namespace(root='/home/lvren/CMPA/CMPA/data', output_dir='/home/lvren/CMPA/CMPA/output/caltech/4shots/seed1', resume='', seed=1, source_domains=None, target_domains=None, transforms=None, config_file='/home/lvren/CMPA/CMPA/configs/tr
ainers/CMPA/vit_b16_c2_ep20_batch4_16ctx.yaml', dataset_config_file='/home/lvren/CMPA/CMPA/configs/datasets/caltech101.yaml', trainer='CMPA', backbone='', head='', eval_only=False, model_dir='', load_epoch=None, no_train=False, opts=['TRAINER.CMPA.PROMPT_DEPTH', '9', 'TRAINER.CMPA.PS', 'True', 'DATASET.NUM_SHOTS', '4', 'DATASET.SUBSAMPLE_CLASSES', 'all'])
Traceback (most recent call last):
File "/home/lvren/CMPA/CMPA/train.py", line 199, in
Thank you very much for your reply!
I have another question. Could you please tell me what is the connection between visual-context, wart-context and prompt-text, prompt-visual? Weren't those two prompts initialized according to the depth of the prompt?
---- Replied Message ---- | From | Wayne @.> | | Date | 04/19/2024 14:37 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [GingL/CMPA] AssertionError: Non-existent key: TRAINER.CMPA.FUSING (Issue #4) |
You can refer to scripts/cmpa/main.sh, and add these cfg keys. image.png (view on web)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Thanks for your work! I get some trouble when i tried to run the code. The error detail is below. Is something wrong with your code?
Traceback (most recent call last): File "/home/lvren/CMPA/CMPA/train.py", line 198, in
main(args)
File "/home/lvren/CMPA/CMPA/train.py", line 120, in main
cfg = setup_cfg(args)
File "/home/lvren/CMPA/CMPA/train.py", line 112, in setup_cfg
cfg.merge_from_list(args.opts)
File "/home/lvren/anaconda3/envs/CMPA/lib/python3.9/site-packages/yacs/config.py", line 243, in merge_from_list
_assert_with_logging(subkey in d, "Non-existent key: {}".format(full_key))
File "/home/lvren/anaconda3/envs/CMPA/lib/python3.9/site-packages/yacs/config.py", line 545, in _assert_with_logging
assert cond, msg
AssertionError: Non-existent key: TRAINER.CMPA.FUSING