필터 지우기
필터 지우기

Error using function 'Predict/MLFB' (#88.48.221)

조회 수: 12 (최근 30일)
Giovanni
Giovanni 2023년 11월 21일
댓글: Giovanni 2023년 11월 24일
I am trying to use a NN, which I pretrained and saved in a .mat file, in simulink (please see the figure attached). My objective is to deploy a block that uses a pretrained network to perform a regression on a random scalar, and then see it on a X,Ygraph.
However, I am getting the following error:
Index exceeds the number of array elements (1). Function 'Predict/MLFB' (#88.48.221), line 2, column 11: "deep.blocks.internal.deepNetwork({in_1}, {size(in_1)}, 'MMT/Predict', 'C:\Users\" Launch diagnostic report.
I am attaching also the files, so that you can launch this very simple model and tell me what is wrong.
Best regards,
Giovanni

답변 (1개)

Ruth
Ruth 2023년 11월 22일
Dear Giovanni,
Thank you for your question and sharing your model.
This is a known issue related to the Predict block that was resolved in R2021a. You can avoid the error by upgrading to MATLAB R2021a or later.
If you are not able to upgrade, you can workaround the issue in R2020b by calling a wrapper predict function from a MATLAB Function Block. This wrapper function loads the network and calls predict. However, this will not be suitable for deployment workflows. I have attached a Simulink model to demonstrate this workflow.
Apologies for any inconvience this may have caused, please let me know if you have any further questions.
Best wishes,
Ruth
  댓글 수: 1
Giovanni
Giovanni 2023년 11월 24일
Dear Ruth,
thank you for your prompt answer. I'll update my version of MATLAB.
Best wishes, Giovanni

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Deep Learning with Simulink에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by