Using "seriesnetwork" type trained network in Simulink with the "Predict" block.
조회 수: 2 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
Srivardhan Gadila
2021년 10월 6일
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!