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

5 visualizaciones (últimos 30 días)
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.

Respuestas (1)

Srivardhan Gadila
Srivardhan Gadila el 6 de Oct. de 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.

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Productos


Versión

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by