Why do I receive error '"plotFcns" must be a row cell array of plot function names' in compiled spplication if perceptron is used as classifier for training Neural Network?

If perceptron is used as classifier in "train" function to train neural network, the program works fine in MATLAB but throws the following error in compiled application-
Error using network/subsasgn>network_subsasgn (line 551)
"plotFcns" must be a row cell array of plot function names.
Error in network/subsasgn (line 10)
Error in perceptron>create_network (line 128)
Error in perceptron (line 74)
Error in testnn (line 3)
nnet:subsasgn:Property
This does not happen when other networks are trained.
The Compiler Support page says that most command line functionality, including functions for training neural networks are supported by MATLAB Compiler.
"perceptron" is also a command line function in Neural Network and must be supported by MATLAB Compiler.

 채택된 답변

In the file "perceptron.m" from the Neural Network toolbox, the function "create_network" returns a network object with the property "plotFcns" defined as {'plotperform','plottrainstate','plotconfusion'}.  Downstream these strings are referenced as function names.  Since they are just strings in the code, there is no way for the dependency analyzer to pick them up as dependencies.
A workaround for this issue is to add these dependencies manually using function "pragma".
Add the following line in the beginning of your file that uses "perceptron" function.
%#function plotperform plottrainstate plotconfusion

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품

릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by