Jittor / PointCloudLib

Jittor Library for Point Cloud Processing
114 stars 21 forks source link

error when training pointconv model for part segmentation task #8

Open amiltonwong opened 3 years ago

amiltonwong commented 3 years ago

Hi, all,

I can train the pointnet and pointnet++ model for the part segmentation task successfully. Here is my command: python train_partseg.py --model pointnet. However, when I train the pointconv model using the similar command: python train_partseg.py --model pointconv. I got the following error inconsistent numbers of samples:

Traceback (most recent call last):
  File "train_partseg.py", line 271, in <module>
    train(model, args, dir_path)
  File "train_partseg.py", line 143, in train
    train_acc = metrics.accuracy_score(train_true_cls, train_pred_cls)
  File "/root/anaconda3/envs/pytorch1.4/lib/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f
    return f(*args, **kwargs)
  File "/root/anaconda3/envs/pytorch1.4/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 202, in accuracy_score
    y_type, y_true, y_pred = _check_targets(y_true, y_pred)
  File "/root/anaconda3/envs/pytorch1.4/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 83, in _check_targets
    check_consistent_length(y_true, y_pred)
  File "/root/anaconda3/envs/pytorch1.4/lib/python3.7/site-packages/sklearn/utils/validation.py", line 263, in check_consistent_length
    " samples: %r" % [int(l) for l in lengths])
ValueError: Found input variables with inconsistent numbers of samples: [28680192, 700200]

Could you give some hints to tackle this issue?

Thanks~

LiewFeng commented 3 years ago

I also encountered similar error. Traceback (most recent call last): File "train_partseg.py", line 262, in <module> train(model, args) File "train_partseg.py", line 148, in train train_acc = metrics.accuracy_score(train_true_cls, train_pred_cls) File "/userhome/evns/jittor/lib/python3.7/site-packages/sklearn/utils/validation.py", line 63, in inner_f return f(*args, **kwargs) File "/userhome/evns/jittor/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 202, in accuracy_score y_type, y_true, y_pred = _check_targets(y_true, y_pred) File "/userhome/evns/jittor/lib/python3.7/site-packages/sklearn/metrics/_classification.py", line 83, in _check_targets check_consistent_length(y_true, y_pred) File "/userhome/evns/jittor/lib/python3.7/site-packages/sklearn/utils/validation.py", line 320, in check_consistent_length " samples: %r" % [int(l) for l in lengths]) ValueError: Found input variables with inconsistent numbers of samples: [28672000, 700000] Any suggestions? Thanks! @MenghaoGuo