MATLAB Answers

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

4 views (last 30 days)
mathbourne on 5 Oct 2017
Answered: Greg Heath on 4 Apr 2019
Hi everyone,
How is it possible to use a sequenceInputLayer with a regressionLayer (neural networks)? I have tried the following code:
layers = [...
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!

Answers (2)

Greg Heath
Greg Heath on 12 Oct 2017
The regression layer is the only one that has no explicit indication of size.
Hope this helps.

Greg Heath
Greg Heath on 4 Apr 2019
The answer is obvious:
help regressionlayer
doc regressionlayer
*Thank you for formally accepting my answer*

Community Treasure Hunt

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

Start Hunting!

Translated by