MiteshPuthran / Speech-Emotion-Analyzer

The neural network model is capable of detecting five different male/female emotions from audio speeches. (Deep Learning, NLP, Python)
MIT License
1.29k stars 436 forks source link

error #42

Open Avi3726 opened 4 years ago

Avi3726 commented 4 years ago

from keras.utils import np_utils from sklearn.preprocessing import LabelEncoder

X_train = np.array(trainfeatures) y_train = np.array(trainlabel) X_test = np.array(testfeatures) y_test = np.array(testlabel)

lb = LabelEncoder()

y_train = np_utils.to_categorical(lb.fit_transform(y_train)) y_test = np_utils.to_categorical(lb.fit_transform(y_test))

ruXlab commented 4 years ago

Can you elaborate please? What is the error, what were you doing and what is the expected output?

Akshay-Mutalik commented 3 years ago

lb = LabelEncoder()

y_train = np_utils.to_categorical(lb.fit_transform(y_train)) y_test = np_utils.to_categorical(lb.fit_transform(y_test))

Error: TypeError: Encoders require their input to be uniformly strings or numbers. Got ['int', 'str']

I was changing to categorical values; getting this error

Can I get an early response ...in a bit of hurry