Renovamen / Speech-Emotion-Recognition

Speech emotion recognition implemented in Keras (LSTM, CNN, SVM, MLP) | 语音情感识别
MIT License
1.02k stars 217 forks source link

运行出现的问题 #55

Open 112zxw opened 1 year ago

112zxw commented 1 year ago

有没有大佬可以帮忙解决一下问题,运行train时报错 Traceback (most recent call last): File "D:\pythonProject\work\Speech-Emotion-Recognition-master\train.py", line 55, in train(config) File "D:\pythonProject\work\Speech-Emotion-Recognition-master\train.py", line 22, in train x_train, x_test, y_train, y_test = of.load_feature(config, config.train_feature_path_opensmile, train=True) File "D:\pythonProject\work\Speech-Emotion-Recognition-master\extract_feats\opensmile.py", line 79, in load_feature scaler = StandardScaler().fit(X) File "D:\pythonProject\venv\lib\site-packages\sklearn\preprocessing_data.py", line 837, in fit return self.partial_fit(X, y, sample_weight) File "D:\pythonProject\venv\lib\site-packages\sklearn\base.py", line 1151, in wrapper return fit_method(estimator, *args, kwargs) File "D:\pythonProject\venv\lib\site-packages\sklearn\preprocessing_data.py", line 873, in partial_fit X = self._validate_data( File "D:\pythonProject\venv\lib\site-packages\sklearn\base.py", line 604, in _validate_data out = check_array(X, input_name="X", check_params) File "D:\pythonProject\venv\lib\site-packages\sklearn\utils\validation.py", line 969, in check_array raise ValueError( ValueError: Found array with 0 sample(s) (shape=(0, 1582)) while a minimum of 1 is required by StandardScaler. 求求了

GOKINGD commented 8 months ago

大概率是你没有按照顺序执行,需要先preprocess,再train。 检查yaml是否出现错误,preprocess是否正确提取特征