Error :Index exceeds the number of array elements (1). while generating code for pretrained imported deep neural network
Ältere Kommentare anzeigen
Hi ,
I am trying to generate C code for a pretrained deep neural network, Network consists of combination input sequential , LSTM , fully connected dense layer and output regreassion layer . The input size of input sequential layer is 7
I wrote the following code for entry level function
function prediction= Trail_predict(InputData)
persistent MyNet;
if isempty(MyNet)
MyNet=coder.loadDeepLearningNetwork('Network.mat');
end
prediction = MyNet.predict(InputData);
end
size(InputData) is 7 1
The function works when i call from the command window
but while checking for issues in matlab coder , i am facing issue Index exceeds the number of array elements (1).
Can someone help me understand what i am doing wrong
2 Kommentare
Walter Roberson
am 14 Sep. 2020
After the assignment to MyNet, display the class() and size() of MyNet, in order to help debug the problem.
sruthi gundeti
am 14 Sep. 2020
Bearbeitet: sruthi gundeti
am 14 Sep. 2020
Akzeptierte Antwort
Weitere Antworten (1)
sruthi gundeti
am 17 Sep. 2020
0 Stimmen
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
