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 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/592507-error-index-exceeds-the-number-of-array-elements-1-while-generating-code-for-pretrained-imported#comment_1007983
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/592507-error-index-exceeds-the-number-of-array-elements-1-while-generating-code-for-pretrained-imported#comment_1007983
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/592507-error-index-exceeds-the-number-of-array-elements-1-while-generating-code-for-pretrained-imported#comment_1008136
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/592507-error-index-exceeds-the-number-of-array-elements-1-while-generating-code-for-pretrained-imported#comment_1008136
Sign in to comment.