mbrossar / ai-imu-dr

AI-IMU Dead-Reckoning
MIT License
818 stars 225 forks source link

Train filter failure with error: TypeError: zeros() received an invalid combination of arguments - got (NoneType, int, int), #72

Open Hazeline2018 opened 2 years ago

Hazeline2018 commented 2 years ago

Hello, I tried setting 'train_filter = 1', but the program failed with the following error. It seems a mismatch between dateset and model?

_terryl@terryl-Dell:~/projects/AI-IMU-DR/ai-imu-dr/src$ python3 main_kitti.py IEKF nets NOT loaded Traceback (most recent call last): File "main_kitti.py", line 483, in launch(KITTIArgs) File "main_kitti.py", line 28, in launch train_filter(args, dataset) File "/home/terryl/projects/AI-IMU-DR/ai-imu-dr/src/train_torch_filter.py", line 61, in train_filter prepare_loss_data(args, dataset) File "/home/terryl/projects/AI-IMU-DR/ai-imu-dr/src/train_torch_filter.py", line 108, in prepare_loss_data Rot_gt = torch.zeros(Ns[1], 3, 3) TypeError: zeros() received an invalid combination of arguments - got (NoneType, int, int), but expected one of:

I saw some topics discussing training failures too. Did anyone have luck training model successfully? My take is that first step, using original program to train a model successfully, then using own dataset to train model toward own application scenarios. Can anyone with success share some advice? Really appreciate the help!

Terry

scott81321 commented 2 years ago

Sorry. I cannot help you. I've never used the train_filter=1 option. What little I recall is that there is a mismatch in the structure of the CNN stored in the temp file and the input format of the program. Also, there are limits to the minimal data size for transforming an oxts file to pickle format.

Hazeline2018 commented 2 years ago

Thanks for the response, Tony, @scott81321 , it's all right, I've figured out the error and get training going. But it still takes some work to fully understand the algorithm and apply to my own datasets for real application.

It seems this project gets cooled down. I'm hoping to have some mates to discuss and work together ...

yuqJin commented 2 years ago

Thanks for the response, Tony, @scott81321 , it's all right, I've figured out the error and get training going. But it still takes some work to fully understand the algorithm and apply to my own datasets for real application.

It seems this project gets cooled down. I'm hoping to have some mates to discuss and work together ...

Hi, what is the error you found, I'm new to this project but I found that I can't start training.

saltrack commented 2 years ago

@Hazeline2018 Did you encounter any size mismatch errors pertaining to iekfnets.p while testing with the trained model from the author, how did you fix it? I've modified the sizes of the layers of the Mesnet but this error continues to persist.

"RuntimeError: mat1 and mat2 shapes cannot be multiplied (47945x64 and 32x2)"

Rajat-Arora commented 2 years ago

@Hazeline2018 could you please help me with the changes that were done for successfully training the model using the original dataset provided by the author also, did you get some errors of size mismatch during testing while loading the existing iekfnets.p file provided by the author? I know the IEKF part of the algorithm but feel a bit stuck while training and loading iekfnets.p. Any help regarding the same would be appreciated.

HaiJuntang commented 1 year ago

Hello, I tried setting 'train_filter = 1', but the program failed with the following error. It seems a mismatch between dateset and model?

_terryl@terryl-Dell:~/projects/AI-IMU-DR/ai-imu-dr/src$ python3 main_kitti.py IEKF nets NOT loaded Traceback (most recent call last): File "main_kitti.py", line 483, in launch(KITTIArgs) File "main_kitti.py", line 28, in launch train_filter(args, dataset) File "/home/terryl/projects/AI-IMU-DR/ai-imu-dr/src/train_torch_filter.py", line 61, in train_filter prepare_loss_data(args, dataset) File "/home/terryl/projects/AI-IMU-DR/ai-imu-dr/src/train_torch_filter.py", line 108, in prepare_loss_data Rot_gt = torch.zeros(Ns[1], 3, 3) TypeError: zeros() received an invalid combination of arguments - got (NoneType, int, int), but expected one of:

  • (tuple of ints size, *, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
  • (tuple of ints size, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requiresgrad)

I saw some topics discussing training failures too. Did anyone have luck training model successfully? My take is that first step, using original program to train a model successfully, then using own dataset to train model toward own application scenarios. Can anyone with success share some advice? Really appreciate the help!

Terry

Hello, I have encountered the same problem. How did you handle it?

seungjuuuuuu commented 4 months ago

Hello, I tried setting 'train_filter = 1', but the program failed with the following error. It seems a mismatch between dateset and model?

_terryl@terryl-Dell:~/projects/AI-IMU-DR/ai-imu-dr/src$ python3 main_kitti.py IEKF nets NOT loaded Traceback (most recent call last): File "main_kitti.py", line 483, in launch(KITTIArgs) File "main_kitti.py", line 28, in launch train_filter(args, dataset) File "/home/terryl/projects/AI-IMU-DR/ai-imu-dr/src/train_torch_filter.py", line 61, in train_filter prepare_loss_data(args, dataset) File "/home/terryl/projects/AI-IMU-DR/ai-imu-dr/src/train_torch_filter.py", line 108, in prepare_loss_data Rot_gt = torch.zeros(Ns[1], 3, 3) TypeError: zeros() received an invalid combination of arguments - got (NoneType, int, int), but expected one of:

  • (tuple of ints size, *, tuple of names names, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requires_grad)
  • (tuple of ints size, *, Tensor out, torch.dtype dtype, torch.layout layout, torch.device device, bool pin_memory, bool requiresgrad)

I saw some topics discussing training failures too. Did anyone have luck training model successfully? My take is that first step, using original program to train a model successfully, then using own dataset to train model toward own application scenarios. Can anyone with success share some advice? Really appreciate the help!

Terry

Hello, I encountered the same problem. How did you finally solve it?