Connect fully connected layer to a convolution layer?
7 ビュー (過去 30 日間)
古いコメントを表示
When building a CNN network for image reconstruction with fully connected layer followed by convolution layers, I found that the output of fully connected layer is always a vector. If I want fully connected layer to be followed by a 2D convolution layer, is there any intermediate layer to reshape the data transferred in between two layers, either on output of fully connected layer or input of convolution layers?
Thanks.
0 件のコメント
回答 (1 件)
Uttiya Ghosh
2020 年 6 月 18 日
Hi Kittel,
From my understanding, you want to introduce a reshape layer between your fully connected layer and 2D convolution layer. There is no reshape layer in MATLAB. As a workaround you can always create a custom layer.
For more information, refer to the following links.
1 件のコメント
Ben Hinkle
2025 年 11 月 6 日 17:45
There is now a reshape layer in MATLAB (since R2025a): https://www.mathworks.com/help/deeplearning/ref/nnet.cnn.layer.reshapelayer.html
The syntax to reshape from fully connected to 2D convolution is
reshapeLayer([h w c], OperationDimension="spatial-channel")
参考
カテゴリ
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!