How can I feed the outputs of a predict block back into its inputs?

조회 수: 9 (최근 30일)
teasy
teasy 2022년 1월 12일
댓글: teasy 2022년 1월 13일
Hello all,
I would like to return the outputs of a Predict block to its input in Simulink. In the Predict block I use a neural network of type DLNetwork, which is forward directed (not recursive). As input format I use 'CT'. The network expects 5 inputs and gives 2 outputs. If I do not feed back the inputs, everything works. Here is a minimal example:
But when I feed back the inputs, I get the following error messages:
  • Layer 'Input': Invalid input data. Invalid size of channel dimension. Layer expects input with channel dimension size 5 but received input with size 1. Function 'Predict1/MLFB' (#1113.64.309), line 2, column 19: "deep.blocks.internal.deepNetwork({in_1}, {size(in_1)}, {class(in_1)}, coder.cons" Launch diagnostic report.
  • 'untitled1/Predict1/MLFB' or the model referenced by it contains a block that updates persistent or state variables while computing outputs and is not supported in an algebraic loop. It is in an algebraic loop with the following blocks.
How do I manage in Simulink to return the outputs of the Predict block without getting an error?
Many thanks in advance.
  댓글 수: 2
VBBV
VBBV 2022년 1월 12일
Use of summer junction for first 2 signals causes the signals to be nullified making it essentially same as without signal.
Delete the summer junction and attach them using a different bus connector
teasy
teasy 2022년 1월 13일
What is a Summer junction? I only use mux and demux blocks. These should be suitable for my operation according to the documentation.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Reinforcement Learning에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by