Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when training pointconv model for part segmentation task #8

Open
amiltonwong opened this issue Mar 17, 2021 · 1 comment
Open

Comments

@amiltonwong
Copy link

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
Copy link

LiewFeng commented May 6, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants