What does this fullyconnectedlayer() used for
4 次查看(过去 30 天)
显示 更早的评论
Ok. I came across this tutorial from mathwork on lstm:
However in the layer options, there is a bit of confusion
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/248806/20191118_124338.jpg)
what is the fullyconnectedlayer(50) used for?
When I read lstm layers guideline, the fullyconnectedlayer should be the number of response. In the tutorial above, it is a regression problem with 1 response.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/248807/20191118_124317.jpg)
This is really confusing. I dont know why there is this fullyconnectedlayer(50) in the tutorial
0 个评论
采纳的回答
Raunak Gupta
2019-11-21
Hi,
The example mentioned in Sequence-to-Sequence Regression Using Deep Learning uses a multi-layer network that is why a fullyConnectedLayer in between is connected. You may also try the example without it but the number of parameters in the Network will decrease which may affect the overall performance (in terms of accuracy) of the Network. The last layer is fullyConnectedLayer(numResponse) which is according the guideline that are mentioned in here.
It’s a general practice in Deep Learning to include fullyConnectedLayer with appropriate outputSize to make the network deep and using dropoutLayer to prevent the network from overfitting.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!