ai-imu-dr icon indicating copy to clipboard operation
ai-imu-dr copied to clipboard

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

Open Hazeline2018 opened this issue 2 years ago • 7 comments

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 requires_grad)_

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

Hazeline2018 avatar Mar 09 '22 17:03 Hazeline2018

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.

scott81321 avatar Mar 11 '22 23:03 scott81321

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 ...

Hazeline2018 avatar Mar 13 '22 17:03 Hazeline2018

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.

yuqJin avatar Mar 23 '22 12:03 yuqJin

@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)"

saltrack avatar Mar 24 '22 13:03 saltrack

@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.

Rajat-Arora avatar Nov 19 '22 02:11 Rajat-Arora

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 requires_grad)_

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?

HaiJuntang avatar Apr 18 '23 13:04 HaiJuntang