molgrad
molgrad copied to clipboard
Unexpected key(s) in state_dict: "gnn.gnn_layer.edge_nn.0.weight", "gnn.gnn_layer.edge_nn.0.bias",
Thanks so much for providing such interesting thoughts. I am trying to run the following code to import the trained model. The model is downloaded from the following address:
wget https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/501185/models.tar.gz -O molgrad/models.tar.gz
tar -xf molgrad/models.tar.gz -C molgrad/
while I try to load the model, the error occured.
model_path = './molgrad/models/herg_noHs.pt'
model.load_state_dict(torch.load(model_path, map_location=DEVICE))
Error(s) in loading state_dict for MPNNPredictor:
Missing key(s) in state_dict: "gnn.gnn_layer.edge_func.0.weight", "gnn.gnn_layer.edge_func.0.bias", "gnn.gnn_layer.edge_func.2.weight", "gnn.gnn_layer.edge_func.2.bias".
Unexpected key(s) in state_dict: "gnn.gnn_layer.edge_nn.0.weight", "gnn.gnn_layer.edge_nn.0.bias", "gnn.gnn_layer.edge_nn.2.weight", "gnn.gnn_layer.edge_nn.2.bias".
What am I doing wrong or am I using the wrong model file? many thanks for your help and suggestons.
Best, Sh-Y