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

ValueError: bad input shape () #393

Closed
ziyuwzf opened this issue Dec 13, 2018 · 2 comments
Closed

ValueError: bad input shape () #393

ziyuwzf opened this issue Dec 13, 2018 · 2 comments
Labels

Comments

@ziyuwzf
Copy link

ziyuwzf commented Dec 13, 2018

Traceback (most recent call last):
File "./demos/classifier.py", line 296, in
infer(args, args.multi)
File "./demos/classifier.py", line 195, in infer
person = le.inverse_transform(maxI)
File "/usr/local/lib/python2.7/dist-packages/sklearn/preprocessing/label.py", line 273, in inverse_transform
y = column_or_1d(y, warn=True)
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 797, in column_or_1d
raise ValueError("bad input shape {0}".format(shape))
ValueError: bad input shape ()

OS and hardware information.

  • Operating system: ubuntu 16.04
  • Torch version: 7
  • CPU architecture: i5
  • GPU type (if using): 1050ti cuda

when i use scikit-learn-0.20.1,it shows these error.then i use scikit-learn-0.19.0,it solved

@k1ic
Copy link

k1ic commented Jan 9, 2019

switch to 0.19.0, I got another error:
Traceback (most recent call last):
File "./demos/classifier.py", line 301, in
infer(args, args.multi)
File "./demos/classifier.py", line 198, in infer
predictions = clf.predict_proba(rep).ravel()
File "/Users/yixia/anaconda2/envs/python27/lib/python2.7/site-packages/sklearn/svm/base.py", line 590, in predict_proba
self._check_proba()
File "/Users/yixia/anaconda2/envs/python27/lib/python2.7/site-packages/sklearn/svm/base.py", line 559, in _check_proba
if self._impl not in ('c_svc', 'nu_svc'):
AttributeError: 'SVC' object has no attribute '_impl'

@stale
Copy link

stale bot commented Mar 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 10, 2019
@stale stale bot closed this as completed Mar 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants