(mg) root@www-System-Product-Name:~/prog/wzp/mg/regression# python test.py --dataset davis --model_path save/20220722_120642_davis/model/epoch-15\,\ loss-0.6345\,\ cindex-0.7072\,\ test_loss-0.6187.pt
Number of test: 5010
Traceback (most recent call last):
File "test.py", line 72, in
main()
File "test.py", line 65, in main
load_model_dict(model, model_path)
File "/root/prog/wzp/mg/regression/utils.py", line 68, in load_model_dict
model.load_state_dict(torch.load(ckpt))
File "/root/anaconda3/envs/mg/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for MGraphDTA:
size mismatch for protein_encoder.embed.weight: copying a param with shape torch.Size([26, 256]) from checkpoint, the shape in current model is torch.Size([26, 128]).
size mismatch for protein_encoder.block_list.0.inc.conv_layer0.inc.0.weight: copying a param with shape torch.Size([96, 256, 3]) from checkpoint, the shape in current model is torch.Size([96, 128, 3]).
size mismatch for protein_encoder.block_list.1.inc.conv_layer0.inc.0.weight: copying a param with shape torch.Size([96, 256, 3]) from checkpoint, the shape in current model is torch.Size([96, 128, 3]).
size mismatch for protein_encoder.block_list.2.inc.conv_layer0.inc.0.weight: copying a param with shape torch.Size([96, 256, 3]) from checkpoint, the shape in current model is torch.Size([96, 128, 3]).
Hello, I encountered such a problem in the regression model test.
(mg) root@www-System-Product-Name:~/prog/wzp/mg/regression# python test.py --dataset davis --model_path save/20220722_120642_davis/model/epoch-15\,\ loss-0.6345\,\ cindex-0.7072\,\ test_loss-0.6187.pt Number of test: 5010 Traceback (most recent call last): File "test.py", line 72, in
main()
File "test.py", line 65, in main
load_model_dict(model, model_path)
File "/root/prog/wzp/mg/regression/utils.py", line 68, in load_model_dict
model.load_state_dict(torch.load(ckpt))
File "/root/anaconda3/envs/mg/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for MGraphDTA:
size mismatch for protein_encoder.embed.weight: copying a param with shape torch.Size([26, 256]) from checkpoint, the shape in current model is torch.Size([26, 128]).
size mismatch for protein_encoder.block_list.0.inc.conv_layer0.inc.0.weight: copying a param with shape torch.Size([96, 256, 3]) from checkpoint, the shape in current model is torch.Size([96, 128, 3]).
size mismatch for protein_encoder.block_list.1.inc.conv_layer0.inc.0.weight: copying a param with shape torch.Size([96, 256, 3]) from checkpoint, the shape in current model is torch.Size([96, 128, 3]).
size mismatch for protein_encoder.block_list.2.inc.conv_layer0.inc.0.weight: copying a param with shape torch.Size([96, 256, 3]) from checkpoint, the shape in current model is torch.Size([96, 128, 3]).
Hello, I encountered such a problem in the regression model test.