Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Hazeline2018 opened this issue Mar 9, 2022 · 7 comments

Comments

@Hazeline2018
Copy link

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

@scott81321
Copy link

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
Copy link
Author

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
Copy link

yuqJin commented Mar 23, 2022

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
Copy link

@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
Copy link

Rajat-Arora commented Nov 19, 2022

@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
Copy link

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?

@seungjuuuuuu
Copy link

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 encountered the same problem. How did you finally solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants