Colin97 / OpenShape_code

official code of “OpenShape: Scaling Up 3D Shape Representation Towards Open-World Understanding”
https://colin97.github.io/OpenShape/
Apache License 2.0
236 stars 16 forks source link

I try to modified src/example.py with PointBert model. But got an error. #19

Closed zzy994491827 closed 9 months ago

zzy994491827 commented 9 months ago

Traceback (most recent call last): File "src/example.py", line 106, in shape_feat = model(xyz, feat, device='cuda', quantization_size=config.model.voxel_size) File "/home/zhouziyang/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, kwargs) File "/home/zhouziyang/pyproject/UMVI/openshape/src/models/ppat.py", line 118, in forward xyz.transpose(-1, -2).contiguous(), features.transpose(-1, -2).contiguous() File "/home/zhouziyang/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, *kwargs) File "/home/zhouziyang/pyproject/UMVI/openshape/src/models/ppat.py", line 97, in forward centroids, feature = self.sa(xyz, features) File "/home/zhouziyang/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(input, kwargs) File "/home/zhouziyang/pyproject/UMVI/openshape/src/models/pointnet_util.py", line 205, in forward new_points = F.relu(bn(conv(new_points))) File "/home/zhouziyang/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1130, in _call_impl return forward_call(*input, **kwargs) File "/home/zhouziyang/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 457, in forward return self._conv_forward(input, self.weight, self.bias) File "/home/zhouziyang/anaconda3/envs/python37/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 454, in _conv_forward self.padding, self.dilation, self.groups) RuntimeError: Given groups=1, weight of size [64, 9, 1, 1], expected input[1, 10, 64, 384] to have 9 channels, but got 10 channels instead

auniquesun commented 2 months ago

@zzy994491827 How do you fix this problem or how do you replace with the PointBERT backbone? It would be appreciated if you can share it.