Error in Resume raining neural network 'The output of layer 12 is incompatible with the input expected by layer 13'.

3 ビュー (過去 30 日間)
I am trying to resume training a neural network ( finetuned ResNet-50) using the command trainNetwork but I got this error message :
'The output of layer 12 is incompatible with the input expected by layer 13'
what I have so far is autosaved checkpoint 'convnet_checkpoint__254__2017_12_19__06_54_40.mat'
and I have two questions here :
1- whats the reason behind that error noting that I haven't changed anything in the layers' properties of the network (input/output).
2- basically this is my training command :
my_net = trainNetwork(Traindatasource,lgraph,options);
so, I am a bit confused about how to resume the training using A or B command ( after loading the checkpoint network, passing the data and training options):
A)
trainNetwork(trainingdatastor,net.Layers,options) because I can see the after loading the checkpoint Network its named 'net'
B) trainNetwork(trainingdatastore,my_net.Layers,options)
thanks
  2 件のコメント
Huawei Tian
Huawei Tian 2018 年 2 月 5 日
I meet the same ERROR. Have you fixed thie error?
caesar
caesar 2018 年 2 月 5 日
unfortunately, NO. when I trained the model without using stop and resume it was ok means I didn't stop the training until its finished. hope that helps.

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

採用された回答

Joakim Lindblad
Joakim Lindblad 2018 年 3 月 9 日
It's because ResNet is a DAG, and thus the net.Layers in the trainNetwork command is not enough, replace it with
trainNetwork(trainingdatastor,layerGraph(net),options)
  3 件のコメント
Lawrence Sherman
Lawrence Sherman 2018 年 6 月 22 日
I have tried it and it works. Thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Data Workflows についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by