How to use neural network classifier in predict function?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I am using App designer in MATLAB R2018a. I am working on human idetification and I have trained networks with SVM and NN.
I'm using predict function for the testing. It's working with SVM but not with NN. Kindly help
This is the code. I have NN classifier in faceClassifier variable.
queryImage = imread('image.jpg');
queryFeatures = extractHOGFeatures(queryImage);
personLabel = predict(faceClassifier,queryFeatures);
It's give me error.
Error using predict (line 84)
No valid system or dataset was specified.
0 Kommentare
Antworten (2)
Akshat
am 30 Jan. 2025
The error you are facing is probably because the "faceClassifier" variable is a different object than expected by "predict". As per the documentation on "predict" (https://www.mathworks.com/help/deeplearning/ref/dlnetwork.predict.html#mw_4af36819-ecbb-46c6-9d6d-6f9397d5b8e1), you can see that "net" variable should be a "DLNetwork" object.
Now, depending on the neural network you are using, the following functions might help:
Hope this helps!
0 Kommentare
Walter Roberson
am 30 Jan. 2025
See https://www.mathworks.com/matlabcentral/answers/427309-classify-requires-at-least-3-arguments#answer_445205 for more information about when to call predict or classify or sim
0 Kommentare
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox 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!