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!
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!