-
Notifications
You must be signed in to change notification settings - Fork 220
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: ValueError: setting an array element with a sequence. #10
Comments
Hi, |
@kantajit did your code work with this solution ? |
Yes, that worked. |
@akane999 I did the same thing as you said corresponding to the same issue. But I got the error shown as below: If I change back, it game me the previous error again. Any advise? thanks |
Please check the dimensions of your data, this error means that an argument that should be a single value is an array, so It will not work.
So check the dimensions.
…________________________________
De: azureway <[email protected]>
Enviado: lunes, 28 de agosto de 2017 02:16 a. m.
Para: bikz05/object-detector
CC: akane999; Mention
Asunto: Re: [bikz05/object-detector] Error when training: ValueError: setting an array element with a sequence. (#10)
@akane999<https://github.com/akane999> I did the same thing as you said corresponding to the same issue. But I got the error shown as below:
Traceback (most recent call last):
File "../object-detector/extract-features.py", line 58, in
fd,hogimage = hog(im, orientations, pixels_per_cell, cells_per_block, visualize, normalize)
ValueError: too many values to unpack
If I change back, it game me the previous error again. Any advise? thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#10 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AKOqjYtQOhZp2TgpsmAgdBeBbax3HWBzks5sciMLgaJpZM4MJmg3>.
|
I was running test-object-detector in bin.
It gives me following error:
Training a Linear SVM Classifier
Traceback (most recent call last):
File "../object-detector/train-classifier.py", line 48, in
clf.fit(list(np.array(fds)), labels)
File "/usr/local/lib/python2.7/dist-packages/sklearn/svm/base.py", line 151, in fit
X, y = check_X_y(X, y, dtype=np.float64, order='C', accept_sparse='csr')
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 521, in check_X_y
ensure_min_features, warn_on_dtype, estimator)
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 382, in check_array
array = np.array(array, dtype=dtype, order=order, copy=copy)
ValueError: setting an array element with a sequence.
Please fix this issue.
The text was updated successfully, but these errors were encountered: