yanx27 / Pointnet_Pointnet2_pytorch

PointNet and PointNet++ implemented by pytorch (pure python) and on ModelNet, ShapeNet and S3DIS.
MIT License
3.58k stars 884 forks source link

PointNetSetAbstraction question #264

Open Lemon2048 opened 4 months ago

Lemon2048 commented 4 months ago

Hello, I made a small modification in the class PointNetSetAbstraction(nn.Module) by adding 1 to the variable in_channel. After making this change, I encountered an issue in the subsequent code:

python for i, conv in enumerate(self.mlp_convs): bn = self.mlp_bns[i] new_points = F.relu(bn(conv(new_points)))

After executing this code, all the values in new_points turn into NaN. I would like to inquire about what might have gone wrong. Thank you.

abysee commented 3 months ago

It is likly that there's a line before calling PointNetSetAbstraction that it sets defalt input channel to 6 or 3. Like in_channel = 6 if normal_channel else 3. You may have to modify the corresponding line.