Reshape layer in deep learning

조회 수: 16 (최근 30일)
KB
KB 2019년 5월 14일
댓글: SHAOJIN MA 2024년 5월 21일
I want to try out a deep learning architecture which first does fully connected layers and then transitions into image convolutions. So after the fully connected layers I want to reshape the weights from a vector into a image like matrix. Is there a reshape layer within the Deep learning toolbox which does this?
  댓글 수: 1
SHAOJIN MA
SHAOJIN MA 2024년 5월 21일
Hi KB,
Did you solve this problem? If yes, could you please show your code? I have encountered the same problem as you.

댓글을 달려면 로그인하십시오.

채택된 답변

Shivam Sardana
Shivam Sardana 2019년 5월 22일
There is no reshape layer in MATLAB which changes output from fully connected layer into image like matrix. You can create a custom deep learning layer to solve this problem. You can refer to this documentation link for more details on creating a custom layer: https://www.mathworks.com/help/deeplearning/ug/define-custom-deep-learning-layers.html
Hope this helps.

추가 답변 (1개)

Tomaso Cetto
Tomaso Cetto 2022년 3월 31일
Hi KB,
As of R2022a, the Deep Learning Toolbox has a new functionLayer - this layer enanbles you to apply a function to the activations of your network. Using this layer is the preferred way of performing the reshaping operation you're after. The link above has an example of how to do this, under the 'Reformat Data Using Function Layer' heading.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by