Problem with pre trained Resnet 50

8 ビュー (過去 30 日間)
Matt Kernan
Matt Kernan 2017 年 11 月 9 日
編集済み: SAQIB SHEIKH 2019 年 9 月 2 日
Hi, i was trying to use pretrained resnet50 to train my own dataset. But i got the following error "The output of layer 12 is incompatible with the input expected by layer 13" So far i know to use a pretrained network, only last three layers need to change. i have change those but still getting the same error.
Can anyone help me on that?
  3 件のコメント
Noha Ghatwary
Noha Ghatwary 2017 年 12 月 29 日
I have the same problem ,, did you manage to find a solution ???
SAQIB SHEIKH
SAQIB SHEIKH 2019 年 9 月 2 日
編集済み: SAQIB SHEIKH 2019 年 9 月 2 日
Every Pratined Model accpect fixed size of all images thats's why problem occur you should be read about the Resnet50 than apply on your data.
image input size of 224-by-224. for This Model

サインインしてコメントする。

回答 (2 件)

Chuanzhen Hu
Chuanzhen Hu 2017 年 12 月 30 日
https://www.mathworks.com/help/nnet/ref/resnet50.html check this web, it says, 'you can use classify to classify new images using the ResNet-50 model. To retrain the network on a new classification task, follow the steps of Transfer Learning Using GoogLeNet', ResNet-50 is a DAG net, it's different with series net.
  1 件のコメント
Soan Duong
Soan Duong 2018 年 8 月 16 日
FYI: https://au.mathworks.com/help/nnet/examples/transfer-learning-using-googlenet.html

サインインしてコメントする。


Divas Bahguna
Divas Bahguna 2019 年 5 月 17 日
This error normally occurs when you try to re-build ResNet50 as a sequential layered network after replacing classification layers with your custom layers. As highlighed by Chuanzhen Hu, ResNet50 is a DAG in Matlab, therefore requiring the reconstructed network to be a layer graph. You usually have to consider connectivity relationships between layers and have to re-construct the network by factorign these relationships in layer graph.
New MATLAB versions come with library APIs to take care of these reconstuctions. Eg.,
However, if you are using older versions of MATLAB you'll have to write these implementations yourselves. Hope this solves the issue.

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by