- resnet50 : https://www.mathworks.com/help/releases/R2021b/deeplearning/ref/resnet50.html
- Deep Network Designer : https://www.mathworks.com/help/releases/R2021b/deeplearning/ref/deepnetworkdesigner-app.html
How to change last layer of Resnet50 in Deep network designer App
27 ビュー (過去 30 日間)
古いコメントを表示
Hello, I hope you are doing well. I want to change the last layer of Resnet50 with my 4 classes, Currently I am using Deep network Desiginer app
How can i do that in MATALAB
0 件のコメント
回答 (1 件)
Milan Bansal
2024 年 9 月 11 日
Hi Med Future
By default Resnet50 is used for classification of 1000 classes. If you wish to modify the model such that it can be used to classify your four classes, replace the last fully connected layer "fc1000" which has an output size of 1000 with a new fully connect layer with output size 4.
Please refer to the following steps to implement this.
1.) Load the resnet50 model in workspace.
net = resnet50;
2.) Open Deep Network Designer Application and load the net from workspace.
3.) Find the layer with the name "fc1000" which should be the last 3rd layer of the model.
4.) Delete "fc1000" and replace it with a new fully connected layer. Set the outputSize of new layer as 4. Save the model into workspace.
Refer to the following documentation links to learn more:
In R2024a resnetNetwork function is introduced which take numClasses as one of the inputs and return the desired model. Here is documentation: https://www.mathworks.com/help/releases/R2024a/deeplearning/ref/resnetnetwork.html
Hope this helps!
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!