How to use a sequenceInputLayer with a regressionLayer (neural networks) ?

조회 수: 3 (최근 30일)
mathbourne
mathbourne 2017년 10월 5일
답변: Greg Heath 2019년 4월 4일
Hi everyone,
How is it possible to use a sequenceInputLayer with a regressionLayer (neural networks)? I have tried the following code:
layers = [...
sequenceInputLayer(inputSize)
fullyConnectedLayer(30)
fullyConnectedLayer(1)
regressionLayer]
which results with the following error message:
Error using trainNetwork (line 140)
The output of layer 3 is incompatible with the input expected by layer 4.
I searched through the manual and have yet to find something that pertains to the expected input of a regressionLayer.
If someone happens to be able to share the relevant documentation or a snippet of code, that would be really helpful.
Thank you very much!
  댓글 수: 2
bjmuld
bjmuld 2017년 10월 11일
same question here. commenting so I get notified.
Omer Sholev
Omer Sholev 2018년 6월 12일
same here, stuck on this Did you find a solution?

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

답변 (2개)

Greg Heath
Greg Heath 2017년 10월 12일
The regression layer is the only one that has no explicit indication of size.
Hope this helps.
Greg

Greg Heath
Greg Heath 2019년 4월 4일
The answer is obvious:
help regressionlayer
doc regressionlayer
*Thank you for formally accepting my answer*
Greg

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by