NeuralNetw​orkClassif​ication object not supported for code generation

1 回表示 (過去 30 日間)
Luke Hubbard
Luke Hubbard 2022 年 4 月 5 日
回答済み: Ji Lee 2022 年 4 月 6 日
I trained a model using fitcnet() as follows:
mdl = fitcnet(trainTable,"Labels","Standardize",true,"Verbose",1)
I would like to see what the C/C++ code looks like so I tried
saveLearnerForCoder(mdl,'fitcnetCode')
but got the following error message:
First argument must be a classification, regression, or nearest neighbor searcher model supported for code generation.
Looking at https://www.mathworks.com/help/stats/savelearnerforcoder.html#bvclu99-Mdl models generated by fitcnet should work as they are ClassificationNeuralNetwork objects. Seems like a straightforward implementation. Why do I get that error?

回答 (1 件)

Ji Lee
Ji Lee 2022 年 4 月 6 日
MATLAB Coder code generation support for neural networks became available recently in R2022a:
That particular documentation link points to the documentation for the latest release (R2022a). If you are using R2021b, you'll want to examine the archived R2021b version of that documentation:

カテゴリ

Help Center および File ExchangeGet Started with Statistics and Machine Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by