-
Hi Matt, I have a GNN model with I got an error when I load the model on new machine like this.
When I print
In the new version, it prints like this :
How can I solve this issue, and why were their names changed? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I have had the same problem before. The way I solved it is to install the legacy version of PyG 1.7.2. Suppose you are using pytorch 1.7.0 + cuda 11.0, This is simple:
I guess in 2.0.2, they made some changes to the architectures (keys) of the network so when loading an old version of the model, the new interpreter cannot recognize the module's name. |
Beta Was this translation helpful? Give feedback.
-
This is the result of our efforts to bring lazy initialization of model parameters to PyG. A simple fix is to replace all state_dict["encoder.down_path.0.lin.weight"] = state_dict["encoder.down_path.0.root"].t() |
Beta Was this translation helpful? Give feedback.
This is the result of our efforts to bring lazy initialization of model parameters to PyG. A simple fix is to replace all
root
occurrences withlin.weight
and transpose the tensor, e.g.: