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

roicrop3d_gpu does not obtain any inner ROI point from the pseudo point cloud which throws an error when forwarding batch layer #62

Open
javierpastorfernandez opened this issue Nov 6, 2023 · 1 comment

Comments

@javierpastorfernandez
Copy link

javierpastorfernandez commented Nov 6, 2023

epochs: 0%| | 0/5 [06:03<?, ?it/s, loss=6.67, lr=0.00112]
Traceback (most recent call last):
File "train.py", line 209, in
main()
File "train.py", line 168, in main
train_model(
File "/home/javpasto/Documents/sfd/tools/train_utils/train_utils.py", line 114, in train_model
accumulated_iter = train_one_epoch(
File "/home/javpasto/Documents/sfd/tools/train_utils/train_utils.py", line 51, in train_one_epoch
loss, tb_dict, disp_dict = model_func(model, batch)
File "/home/javpasto/Documents/sfd/pcdet/models/init.py", line 28, in model_func
ret_dict, tb_dict, disp_dict = model(batch_dict)
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/javpasto/Documents/sfd/pcdet/models/detectors/sfd.py", line 13, in forward
batch_dict = cur_module(batch_dict)
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/javpasto/Documents/sfd/pcdet/models/roi_heads/sfd_head.py", line 674, in forward
points_features_expand = self.cpconvs_layer(points_features, points_neighbor)[1:]
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/javpasto/Documents/sfd/pcdet/models/roi_heads/sfd_head_utils.py", line 68, in forward
pointnet1_out_fea = self.pointnet1_fea(pointnet1_in_fea).view(N, -1)
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/javpasto/Documents/sfd/pcdet/models/roi_heads/sfd_head_utils.py", line 17, in forward
x = F.relu(self.bn1(self.conv1(x)))
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/modules/batchnorm.py", line 131, in forward
return F.batch_norm(
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/functional.py", line 2054, in batch_norm
_verify_batch_size(input.size())
File "/home/javpasto/anaconda3/envs/sfd/lib/python3.8/site-packages/torch/nn/functional.py", line 2037, in _verify_batch_size
raise ValueError('Expected more than 1 value per channel when training, got input size {}'.format(size))
ValueError: Expected more than 1 value per channel when training, got input size torch.Size([1, 12, 1])

Upon reviewing the sizes of the tensors involved:
(points_features) shape: torch.Size([1, 9])
(points_neighbor) shape: torch.Size([1, 9])

(points_features) shape: torch.Size([1, 9])
(pointnet1_in_fea) shape: torch.Size([1, 1, 6])
one can see that after running the function roicrop3d_gpu, no inner ROI point is retrieve from the pseudo point cloud which throws an error when forwarding batch layer.

I do not how to solve this issue. I have been debugging and trying different things for weeks.
Thank you in advance!

@vacant-ztz
Copy link

hello,have you solved the problem? and how?

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

2 participants