chenzhik / AnchorFormer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

About “ coarse_point = coarse_relative + coor”?

liqingque opened this issue · comments

Thank you for your outstanding work!
I have some problems
When I run the program I get the following error:
File "AnchorFormer_utils.py", line 633, in forward
coarse_point = coarse_relative + coor
RuntimeError: The size of tensor a (256) must match the size of tensor b (224) at non-singleton dimension 1
I printed the output of coor_2 and coor:
0 torch.Size([2, 16, 3])
1 torch.Size([2, 144, 3])
0 torch.Size([2, 16, 3])
1 torch.Size([2, 160, 3])
0 torch.Size([2, 16, 3])
1 torch.Size([2, 176, 3])
0 torch.Size([2, 16, 3])
1 torch.Size([2, 192, 3])
0 torch.Size([2, 16, 3])
1 torch.Size([2, 208, 3])
0 torch.Size([2, 16, 3])
1 torch.Size([2, 224, 3])
The size of the coor is found to be related to the number of layers of the encoder
When the number of encoder layers is 6, the coor size is 128+16*6=224
This creates a contradiction, how can I solve it ?
if I need to set the number of layers of the encoder to 8?
I am looking forward to your reply!

Thank you for your outstanding work! I have some problems When I run the program I get the following error: File "AnchorFormer_utils.py", line 633, in forward coarse_point = coarse_relative + coor RuntimeError: The size of tensor a (256) must match the size of tensor b (224) at non-singleton dimension 1 I printed the output of coor_2 and coor: 0 torch.Size([2, 16, 3]) 1 torch.Size([2, 144, 3]) 0 torch.Size([2, 16, 3]) 1 torch.Size([2, 160, 3]) 0 torch.Size([2, 16, 3]) 1 torch.Size([2, 176, 3]) 0 torch.Size([2, 16, 3]) 1 torch.Size([2, 192, 3]) 0 torch.Size([2, 16, 3]) 1 torch.Size([2, 208, 3]) 0 torch.Size([2, 16, 3]) 1 torch.Size([2, 224, 3]) The size of the coor is found to be related to the number of layers of the encoder When the number of encoder layers is 6, the coor size is 128+16*6=224 This creates a contradiction, how can I solve it ? if I need to set the number of layers of the encoder to 8? I am looking forward to your reply!

Yes, it set the number of the encoder blocks as 8 in our settings. If you would like to predict less points (e.g. set "num_query" as 224) in the coarse point cloud, the number of encoder blocks should be smaller (num_encoder_blk should be 6) for a slight modification on the structure.

Hope this will help you.