Hi everyone.
I have a project in which I have to deploy a SVM (support vector machine) model into an ARM Cortex-M processor. I have already successfully trained my SVM, but I don't know how to deploy it on my edge device (microcontroller). I know that there is a library for neural network (CMSIS NN), but it has little support, as far as I can see. Can anyone help?

 채택된 답변

Walter Roberson
Walter Roberson 2019년 1월 1일

1 개 추천

In your interactive MATLAB session, you save() the classification model you trained. In the code for use on the deployed machine, you load() the model and predict() using it.

댓글 수: 2

Dear Walter Roberson,
Which interactive MATLAB session you mean? Could you please share the link of it? Thanks in advance :)
Regards,
Nikhilesh K
I am referring to the matlab desktop .

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Micael Coutinho
Micael Coutinho 2019년 1월 2일

0 개 추천

Thank you. It worked.

댓글 수: 4

Hello Micael Coutinho,
I am happy that it worked for you in successfully deploying your SVM model on an ARM cortex-M MCU. I have the same thing to do but could not figure out how. I have achieved the task on MATLAB, got the model trained with a good validation accuracy of 98%, able to make live predictions also. But I want to deploy my algorithm on to the ARM cortex-M MCU. I would be grateful to you if you could please guide me through how you achieved it step by step? Thanks in advance.
Regards,
Nikhilesh K
You cannot deploy the training portion of your algorithm . You need to save the trained matrix . Then you create a new program that load() the saved matrix and uses it to predict() and it is that new program that you deploy .
Nikhilesh Karanam
Nikhilesh Karanam 2019년 3월 18일
편집: Nikhilesh Karanam 2019년 3월 18일
Thanks. Well, yes. deploying the training portion is not possible. I have used classification learner App, selected Linear SVM for my project, trained the model got a validation accuracy of 98%. I generated a matlab script from the App and used the function for prediction of new data in the generated script which looks like this:
yfit = trainedClassifier.predictFcn(T2)
I get good results on MATLAB and I am stuck here. Please let me know how I can move forward from this point in generating C code if you have any idea. Thanks :)
I am not sure. You might have to alter that to use
yfit = predict(trainedClassifier, T2);

댓글을 달려면 로그인하십시오.

제품

릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by