Closed Yixing-Wu closed 1 year ago
I got the same error when I was doing alignment training and importing the pre-training provided by the author, so I hope I can learn how to solve it.
=> loading model '../cache/Reg_only/reg_0280.pth'
Traceback (most recent call last):
File "train_reg.py", line 163, in
If you follow the given experimental requirements, you should not encounter similar problems. Please check the version of the code base, e.g., PyTorch and kornia.
When I use test_reg.py and pretrained model reg_0280.pth to test the registration process,I got a keyerror: 'spatial_transform.grid'. Can you help me? The more information about this error is as following:
===> loading trained model '../reg_0280.pth' Traceback (most recent call last): File "test_reg.py", line 187, in
main(args)
File "test_reg.py", line 61, in main
net.load_state_dict(model_state_dict)
File "/home/wu/UMF/Test/../models/deformable_net.py", line 74, in load_state_dict
state_dict.pop('spatial_transform.grid')
KeyError: 'spatial_transform.grid'