Connect fully connected layer to a convolution layer?

조회 수: 7 (최근 30일)
Kittel Le
Kittel Le 2019년 3월 11일
댓글: Ben Hinkle 2025년 11월 6일
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.

답변 (1개)

Uttiya Ghosh
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
Ben Hinkle 2025년 11월 6일
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 CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by