Shallow Neural Networks does not work with MATLAB APP after compilation
Dear all,
I am trying to implement a trained Shallow Neural Network inside a designed Matlab APP. The ANN has 2 hidden layers and has been calibrated through a code with the function train, and then saved in the workspace, as follows:
[net,tr] = train(net,x,t);
save("namefile.mat",’net’)
At this point, for using the ANN inside an .mlapp file, I am loading it with the function "load", and the using it recalling the name of the net itself, as follows:
load("namefile")
output=net(input);
As long as I am using this approach, before the APP compilation, everything works fine with the execution of the .mlapp file. However, after the creation of the standalone application through the "Application Compiler", the prevision line gives the following error:
"Index exceeds the number of array elements. Index must not exceed 1."
I am trying to solve the problem also by using the "sim" function, but it didn’t work, since it seems a compatibility issue between the .mlapp and the .exe file.
How can I solve this problem?
Thank you and regardsDear all,
I am trying to implement a trained Shallow Neural Network inside a designed Matlab APP. The ANN has 2 hidden layers and has been calibrated through a code with the function train, and then saved in the workspace, as follows:
[net,tr] = train(net,x,t);
save("namefile.mat",’net’)
At this point, for using the ANN inside an .mlapp file, I am loading it with the function "load", and the using it recalling the name of the net itself, as follows:
load("namefile")
output=net(input);
As long as I am using this approach, before the APP compilation, everything works fine with the execution of the .mlapp file. However, after the creation of the standalone application through the "Application Compiler", the prevision line gives the following error:
"Index exceeds the number of array elements. Index must not exceed 1."
I am trying to solve the problem also by using the "sim" function, but it didn’t work, since it seems a compatibility issue between the .mlapp and the .exe file.
How can I solve this problem?
Thank you and regards Dear all,
I am trying to implement a trained Shallow Neural Network inside a designed Matlab APP. The ANN has 2 hidden layers and has been calibrated through a code with the function train, and then saved in the workspace, as follows:
[net,tr] = train(net,x,t);
save("namefile.mat",’net’)
At this point, for using the ANN inside an .mlapp file, I am loading it with the function "load", and the using it recalling the name of the net itself, as follows:
load("namefile")
output=net(input);
As long as I am using this approach, before the APP compilation, everything works fine with the execution of the .mlapp file. However, after the creation of the standalone application through the "Application Compiler", the prevision line gives the following error:
"Index exceeds the number of array elements. Index must not exceed 1."
I am trying to solve the problem also by using the "sim" function, but it didn’t work, since it seems a compatibility issue between the .mlapp and the .exe file.
How can I solve this problem?
Thank you and regards app designer, neural network, not working, compatibility, compiler MATLAB Answers — New Questions