divelab / DIG

A library for graph deep learning research
https://diveintographs.readthedocs.io/
GNU General Public License v3.0
1.87k stars 283 forks source link

keys unmatched for SubgraphX.ipynb #66

Closed zacharykzhao closed 2 years ago

zacharykzhao commented 2 years ago

when I test the demo for https://github.com/divelab/DIG/blob/dig/examples/xgraph/subgraphx.ipynb, the error rises:

Traceback (most recent call last): File "main.py", line 35, in <module> model.load_state_dict(torch.load(ckpt_path)['state_dict']) File "module.py", line 1482, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for GCN_2l: Missing key(s) in state_dict: "conv1.lin.weight", "convs.0.lin.weight". Unexpected key(s) in state_dict: "conv1.weight", "convs.0.weight".

which corresponds to the last line of [3] in https://github.com/divelab/DIG/blob/dig/examples/xgraph/subgraphx.ipynb.

mengliu1998 commented 2 years ago

Hi @zacharykzhao,

Thanks for your interest.

It seems that this issue is caused by the PyG version. Could you refer to issue #54? Thanks.

zacharykzhao commented 2 years ago

Hi @zacharykzhao,

Thanks for your interest.

It seems that this issue is caused by the PyG version. Could you refer to issue #54? Thanks.

Thanks a lot. I have fixed this problem.