PointNet++ model;I am encountering an assertion issue when modifying the categories for the segmentation model

57 Views Asked by At

I previously had 13 categories for this model, and now I have changed it to 17 categories for segmentation. I have updated both the 'num_classes' and the weights to correspond to the 17 categories. I also modified 'pointnet_sem_seg' to accommodate 17 categories. However, I am still encountering an assertion error on my end.

BN momentum updated to: 0.100000
  0%|                                          | 5/3121 [00:30<05:34,  9.32it/s]/opt/conda/conda-bld/pytorch_1614378098133/work/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [10,0,0] Assertion `t >= 0 && t < n_classes` failed.
/opt/conda/conda-bld/pytorch_1614378098133/work/aten/src/THCUNN/ClassNLLCriterion.cu:108: cunn_ClassNLLCriterion_updateOutput_kernel: block: [0,0,0], thread: [26,0,0] Assertion `t >= 0 && t < n_classes` failed.
  0%|                                        | 5/3121 [00:30<5:19:21,  6.15s/it]
Traceback (most recent call last):
  File "/home/dl/Pointnet_Pointnet2_pytorch/train_semseg.py", line 303, in <module>
    main(args)
  File "/home/dl/Pointnet_Pointnet2_pytorch/train_semseg.py", line 202, in main
    loss = criterion(seg_pred, target, trans_feat, weights)
  File "/home/dl/anaconda3/envs/python3.7/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/dl/Pointnet_Pointnet2_pytorch/models/pointnet_sem_seg.py", line 42, in forward
    mat_diff_loss = feature_transform_reguliarzer(trans_feat)
  File "/home/dl/Pointnet_Pointnet2_pytorch/models/pointnet_utils.py", line 140, in feature_transform_reguliarzer
    I = I.cuda()
RuntimeError: CUDA error: device-side assert triggered
1

There are 1 best solutions below

0
sheng1_2 On

The labels of the dataset should be annotated sequentially. The number of labels in the dataset should match the number specified in the code, ensuring a proper execution without assertion errors.