You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
When try to run the code,I meet the error like followings:
('Calculating descriptos. Number of images is', 5)
('Training GMM of size', 5)
(5, 514)
(5,)
Traceback (most recent call last):
File "pyFisherVector.py", line 146, in
classifier = train(gmm, fisher_features)
File "pyFisherVector.py", line 116, in train
clf.fit(X, Y)
File "/usr/local/lib/python2.7/dist-packages/sklearn/svm/base.py", line 150, in fit
y = self._validate_targets(y)
File "/usr/local/lib/python2.7/dist-packages/sklearn/svm/base.py", line 506, in _validate_targets
% len(cls))
ValueError: The number of classes has to be greater than one; got 1
I just put 5 images in a folder,I have printed Y is (0,0,0,0,0).Is it the reason why show the error that the number of classes just got 1?If you know how to solve this problem,could you share with me?Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
When try to run the code,I meet the error like followings:
('Calculating descriptos. Number of images is', 5)
('Training GMM of size', 5)
(5, 514)
(5,)
Traceback (most recent call last):
File "pyFisherVector.py", line 146, in
classifier = train(gmm, fisher_features)
File "pyFisherVector.py", line 116, in train
clf.fit(X, Y)
File "/usr/local/lib/python2.7/dist-packages/sklearn/svm/base.py", line 150, in fit
y = self._validate_targets(y)
File "/usr/local/lib/python2.7/dist-packages/sklearn/svm/base.py", line 506, in _validate_targets
% len(cls))
ValueError: The number of classes has to be greater than one; got 1
I just put 5 images in a folder,I have printed Y is (0,0,0,0,0).Is it the reason why show the error that the number of classes just got 1?If you know how to solve this problem,could you share with me?Thanks!
The text was updated successfully, but these errors were encountered: