Testing classifying gender on LSTM
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I tried to recreate gender classification using LSTM Method for deep learning.
On the example, it show the prediction for all training data.
But I still confused on how to test a random sample .wav file fom the test dataset, so that my matlab can give specific prediction ouput of its gender labels.
I tried to add new line below and use predict, but it didn't work.
prediction = classify(net,sample_feature)
Can anyone explain or provide me link on how to test random file and give specific labels ouput?
0 Kommentare
Akzeptierte Antwort
jibrahim
am 19 Jan. 2021
Alfi,
The second section of this example (Classify Gender with a Pre-Trained Network) addresses this:
2 Kommentare
jibrahim
am 20 Jan. 2021
In your code, prediction is the predicted label from the speech file you're chekcing. I do not know what labelsTrain is, but I suspect it contains labels from multiple files, rather just one, so you get an error because prediction and labelsTrain have inconsistent sizes. Note that it does not make much sense to generate a confusion matrix for one prediction. A confusion matric would be useful if you classify a large number of files.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Pattern Recognition and Classification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!