How to use a sequenceInputLayer with a regressionLayer (neural networks) ?
显示 更早的评论
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
2017-10-11
same question here. commenting so I get notified.
Omer Sholev
2018-6-12
same here, stuck on this Did you find a solution?
回答(2 个)
Greg Heath
2017-10-12
0 个投票
The regression layer is the only one that has no explicit indication of size.
Hope this helps.
Greg
2 个评论
Omer Sholev
2018-6-12
So what should we do? thanks
Guy Schofield
2019-4-4
Can you put an example code for the solution?
Thanks
Greg Heath
2019-4-4
0 个投票
The answer is obvious:
help regressionlayer
doc regressionlayer
*Thank you for formally accepting my answer*
Greg
类别
在 帮助中心 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!