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: Array 'mean' must be a vector of length 16384. #9

Open
Monarch1995 opened this issue Apr 25, 2019 · 1 comment
Open

ValueError: Array 'mean' must be a vector of length 16384. #9

Monarch1995 opened this issue Apr 25, 2019 · 1 comment

Comments

@Monarch1995
Copy link

I have tried a few hours to solve this problem,but i failed.almost in line 38, the likelihood_statistics function,g = [multivariate_normal(mean=means[k], cov=covs[k]) for k in range(0, len(weights))],i think this is the main problem,but i can't solve it,can you help me?thank you very much.

@Monarch1995
Copy link
Author

D:\Anaconda3\python.exe E:/fisher/new.py
Traceback (most recent call last):
File "E:/fisher/new.py", line 6, in
from sklearn import svm
File "D:\Anaconda3\lib\site-packages\sklearn\svm_init_.py", line 13, in
from .classes import SVC, NuSVC, SVR, NuSVR, OneClassSVM, LinearSVC,
File "D:\Anaconda3\lib\site-packages\sklearn\svm\classes.py", line 4, in
from .base import fit_liblinear, BaseSVC, BaseLibSVM
File "D:\Anaconda3\lib\site-packages\sklearn\svm\base.py", line 11, in
from ..preprocessing import LabelEncoder
File "D:\Anaconda3\lib\site-packages\sklearn\preprocessing_init
.py", line 6, in
from ._function_transformer import FunctionTransformer
File "D:\Anaconda3\lib\site-packages\sklearn\preprocessing_function_transformer.py", line 5, in
from ..utils.testing import assert_allclose_dense_sparse
File "D:\Anaconda3\lib\site-packages\sklearn\utils\testing.py", line 54, in
from nose.tools import raises as nose_raises
File "D:\Anaconda3\lib\site-packages\nose_init
.py", line 1, in
from nose.core import collector, main, run, run_exit, runmodule
File "D:\Anaconda3\lib\site-packages\nose\core.py", line 11, in
from nose.config import Config, all_config_files
File "D:\Anaconda3\lib\site-packages\nose\config.py", line 8, in
from nose.util import absdir, tolist
File "D:\Anaconda3\lib\site-packages\nose\util.py", line 12, in
from nose.pyversion import ClassType, TypeType, isgenerator, ismethod
File "D:\Anaconda3\lib\site-packages\nose\pyversion.py", line 36, in
import new
File "E:\fisher\new.py", line 160, in
fisher_features = fisher_features(folder, gmm)
File "E:\fisher\new.py", line 121, in fisher_features
features = {folder: get_fisher_vectors_from_folder(folder, gmm)}
File "E:\fisher\new.py", line 111, in get_fisher_vectors_from_folder
fv = fisher_vector(image_descriptors(file),*gmm)
File "E:\fisher\new.py", line 78, in fisher_vector
s0, s1, s2 = likelihood_statistics(samples, means, covs, w)
File "E:\fisher\new.py", line 43, in likelihood_statistics
g = [multivariate_normal(mean=means[k], cov=covs[k]) for k in range(0, len(weights))]
File "E:\fisher\new.py", line 43, in
g = [multivariate_normal(mean=means[k], cov=covs[k]) for k in range(0, len(weights))]
File "D:\Anaconda3\lib\site-packages\scipy\stats_multivariate.py", line 358, in call
seed=seed)
File "D:\Anaconda3\lib\site-packages\scipy\stats_multivariate.py", line 727, in init
None, mean, cov)
File "D:\Anaconda3\lib\site-packages\scipy\stats_multivariate.py", line 399, in _process_parameters
raise ValueError("Array 'mean' must be a vector of length %d." % dim)
ValueError: Array 'mean' must be a vector of length 16384.

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

1 participant