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: Expected 2D array, got 1D array instead: #2

Open
hjian2017 opened this issue Oct 13, 2017 · 2 comments
Open

ValueError: Expected 2D array, got 1D array instead: #2

hjian2017 opened this issue Oct 13, 2017 · 2 comments

Comments

@hjian2017
Copy link

Step.1 Training data loading... done!

Step.2 Training model...
Traceback (most recent call last):
File "main.py", line 123, in
main()
File "main.py", line 96, in main
speechRecognizerList = training(trainSpeechList)
File "main.py", line 46, in training
speechRecognizer.getHmmModel()
File "/home/hjian/google/hawking/Speech_Recognition/src/utils.py", line 91, in getHmmModel
model.fit(self.trainData) # get optimal parameters
File "build/bdist.linux-x86_64/egg/hmmlearn/base.py", line 423, in fit
File "/usr/local/lib/python2.7/dist-packages/sklearn/utils/validation.py", line 410, in check_array
"if it contains a single sample.".format(array))
ValueError: Expected 2D array, got 1D array instead:
array=[ array([[ 9.40209590e+00, 2.31332069e+00, -4.39288388e-01,
4.48900498e-01, -4.38783780e-01, 7.17864611e-01,
1.34303265e-01, -8.46420413e-01, -9.96619422e-02,
-2.11934015e-01, 2.94443307e-01, -2.60837321e-01,
-5.68513326e-02],
[ 9.42433231e+00, 1.97682124e+00, -3.76114448e-01,
5.84995514e-01, -7.75079962e-01, 6.33918830e-01,
2.55590945e-01, -8.52373971e-01, 8.62750128e-02,
1.64632304e-04, 1.61292471e-01, -1.98488390e-01,

@andreaschandra
Copy link

any update on this?

@Jojozzc
Copy link

Jojozzc commented Oct 21, 2018

我遇到了相同的问题

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

3 participants