KPConv-PyTorch icon indicating copy to clipboard operation
KPConv-PyTorch copied to clipboard

About the C2 fast confusion

Open WanpengShao opened this issue 1 year ago • 2 comments

C1 is right. But for C2 fast_confusion error: ValueError: operands could not be broadcast together with shapes (135,) (2468,) I do not why self.val_prob is 2468 that leads to the error. Please check.

WanpengShao avatar Oct 13 '22 09:10 WanpengShao

I get the same error. I'm running on my data with 8 classes instead of 40. vec_conf = np.bincount(true * num_classes + pred) ValueError: operands could not be broadcast together with shapes (707,) (2468,)

@WanpengShao did you solve this error?

shayannikoohemat avatar Nov 23 '22 16:11 shayannikoohemat

ok, found the issue, in the file ModelNet40.py the number of test and train samples are hard coded:

  # Number of models and models used per epoch
  if self.train:
      self.num_models = 9843
      if config.epoch_steps and config.epoch_steps * config.batch_num < self.num_models:
          self.epoch_n = config.epoch_steps * config.batch_num
      else:
          self.epoch_n = self.num_models
  else:
      self.num_models = 2468
      self.epoch_n = min(self.num_models, config.validation_size * config.batch_num)

The number 2468 comes from here. If you change those to the actual number of split samples in your test.txt and train.txt files then the error should be resolved.

shayannikoohemat avatar Nov 23 '22 16:11 shayannikoohemat