Using "seriesnetwork" type trained network in Simulink with the "Predict" block.

3 vues (au cours des 30 derniers jours)
Noyan Üzer
Noyan Üzer le 12 Juin 2021
Hello,
I have trained this 2-layer network for regression using MATLAB's trainNetwork function. It takes 3 feature inputs and has 1 output. It works just fine in MATLAB(with the "predict" function), but I need to use the "seriesnetwork" type trained NN in Simulink. I have saved the network as a ".mat" file and tried to use it with the predict block in Simulink, but I can't get past the
"Invalid size specification for the input to the predict method. The network input must have feature dimension 3."
error. I feed the 3 input features to the network as a 3-by-1 column vector like the documentation suggests; however, I simply could not make it work. Has anyone faced a similar issue? Can anyone help me out with this?
Thank you.

Réponses (1)

Srivardhan Gadila
Srivardhan Gadila le 6 Oct 2021
As per the documentation of Predict block, the input for feature type of data should be of the shape "N-by-numFeatures" numeric array, where N is the number of observations and numFeatures is the number of features of the input data. Hence in this case it shoul be of shape 1-by-3 for a single observation.
Refer to the description under "Input" in the documentation of Predict block.

Catégories

En savoir plus sur Sequence and Numeric Feature Data Workflows dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by