lixinustc / GraphAdapter

The efficient tuning method for VLMs
74 stars 1 forks source link

AttributeError: GRAPHADAPTER #11

Open smurf-1119 opened 7 months ago

smurf-1119 commented 7 months ago

I encounter AttributeError: GRAPHADAPTER when I run the script scripts/graphclip/main_v1.sh.

Traceback (most recent call last): File "train.py", line 213, in main(args) File "train.py", line 147, in main trainer = build_trainer(cfg) File "/Dassl.pytorch/dassl/engine/build.py", line 11, in build_trainer return TRAINER_REGISTRY.get(cfg.TRAINER.NAME)(cfg) File "/Dassl.pytorch/dassl/engine/trainer.py", line 325, in init self.build_model() File "/GraphAdapter/trainers/baseclip_graph_v1.py", line 354, in build_model self.model = CustomCLIP(cfg, classnames, clip_model, self.train_loader_x).cuda() File "/GraphAdapter/trainers/baseclip_graph_v1.py", line 313, in init self.graph_learner = GraphLearner(cfg, classnames, clip_model, base_text_features, base_img_features) File "/GraphAdapter/trainers/baseclip_graph_v1.py", line 191, in init self.beta_it = cfg.TRAINER.GRAPHADAPTER.BETA File "/home/miniconda3/envs/dassl/lib/python3.8/site-packages/yacs/config.py", line 141, in getattr raise AttributeError(name) AttributeError: GRAPHADAPTER

Could you please tell me how to fix it?

lixinustc commented 7 months ago

You can substitute the cfg.TRAINER.GRAPHADAPTER.BETA as a fixed value, such as 0.2, 0.3, 0.4. When I am free, I will refine the basic code for the convenient setting with the script, Thanks.

lixinustc commented 7 months ago

Notably that the setting of beta will be important for the adapter-style tuning.

smurf-1119 commented 7 months ago

Thanks for your comments.