ZhonghuiGu / HEAL

41 stars 5 forks source link

Urgent! Missing key(s) in state_dict of provided models #3

Closed wlin16 closed 12 months ago

wlin16 commented 1 year ago

Hi!

First of all, well done and nice work!

I was trying to use HEAL and follow the instruction given in the repo, however it seems that the provided model's weight is not matched.

I used the same .pdb file as also the same parameters setting:

python predictor.py --task mf \ --device 0 \ --pdb case_study/4RQ2-A.pdb \ --only_pdbch false \ --prob 0.5 \

However, I got this error message: RuntimeError: Error(s) in loading state_dict for CL_protNET: Missing key(s) in state_dict: "gcn.gcn.0.lin.weight", "gcn.gcn.1.lin.weight", "gcn.gcn.2.lin.weight", "gcn.pool.pools.0.mab.layer_k.lin.weight", "gcn.pool.pools.0.mab.layer_v.lin.weight", "gcn.pool.pools.1.mab.layer_k.lin.weight", "gcn.pool.pools.1.mab.layer_v.lin.weight". Unexpected key(s) in state_dict: "gcn.gcn.0.weight", "gcn.gcn.1.weight", "gcn.gcn.2.weight", "gcn.pool.pools.0.mab.layer_k.weight", "gcn.pool.pools.0.mab.layer_v.weight", "gcn.pool.pools.1.mab.layer_k.weight", "gcn.pool.pools.1.mab.layer_v.weight".

Could you please help me with this problem and it is very urgent as we would like to use HEAL for one of our project while the deadline in almost in two days

Thank you very much for your help!

ZhonghuiGu commented 1 year ago

Hi!

Thank you for being interested about our tool and report the error! The error might be caused by the unsuitable version of PyTorch and PYG with HEAL. A robust way to set up the environment has been updated in README, and I hope it will help.

ss0830 commented 12 months ago

Hello, this is a very good project! But I also have the above problem, does pytorch have to use 1.7 + cuda10.2? If the cuda version must be higher than 11.1, and pytorch1.12+cuda11.3 is installed, and the corresponding PYG package is installed, it will also report the above error, is there any solution?

ZhonghuiGu commented 12 months ago

I think you'd better use the provided environment, as it is the certain stable version that matches the codes.