Reshape layer in deep learning

114 次查看(过去 30 天)
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?

采纳的回答

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 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by