mbrossar / ai-imu-dr

AI-IMU Dead-Reckoning
MIT License
780 stars 221 forks source link

Problem with pre-trained parameters #88

Open TiloccaS opened 4 months ago

TiloccaS commented 4 months ago

hi @mbrossar @marooncn, I think you have done a great job, I wanted to ask if it is possible to have the network weights pre trained updated to the current network configuration, as I have this error:


raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for TORCHIEKF:
        Unexpected key(s) in state_dict: "mes_net.cov_net.8.weight", "mes_net.cov_net.8.bias", "mes_net.cov_net.12.weight", "mes_net.cov_net.12.bias", "mes_net.cov_net.16.weight", "mes_net.cov_net.16.bias".
        size mismatch for mes_net.cov_net.4.weight: copying a param with shape torch.Size([64, 32, 5]) from checkpoint, the shape in current model is torch.Size([32, 32, 5]).
        size mismatch for mes_net.cov_net.4.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model 
is torch.Size([32])
luopengting commented 1 month ago

Hi, based on the checkpoint provided and my guesswork, I fixed this problem and verified that the inference results are correct. I hope this will help you. :D code: https://github.com/luopengting/ai-imu-dr/blob/master/src/utils_torch_filter.py

result: 2011_09_30_drive_0027_extract