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

5 Ansichten (letzte 30 Tage)
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.

Antworten (1)

Srivardhan Gadila
Srivardhan Gadila am 6 Okt. 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.

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by