using neural network in Simulink
2 views (last 30 days)
I have trained a neural network using LSTM method for sequence classification and load it in Simulink blocks "stateful classify", "predict", "classify", and expect a category number for the outcome of the blocks when I apply same-type sequences, but I get only a decimal between 0 and 1 instead, as shown in below pic:
any idea what is wrong with the blocks I am using? I was going to attach the Simulink model and workspace data related to the trained neural network model and input time series required to run the Simulink model but they were over size limit. will appreciate your response.
David Willingham on 9 Nov 2021
Are you asking why the "Predict" block is acting differently than the "Stateful Predict" block? IF so, are you specifying the same model in each?
If so, these block behave differently. The main difference is that if you are using a trained network with at least one recurrent layer (for example, an LSTM network), then Stateful predict is the block to use.