Restart Training in Semantic Segmentation of Multispectral Images Using Deep Learning

2 次查看(过去 30 天)
Hi,
I went through the example "Semantic Segmentation of Multispectral Images Using Deep Learning." I'd like to restart training to improve the network I trained and, according to MATLAB's help, one needs to provide the net.Layers data to trainNetwork.
The command I used to restart training is
[net,info] = trainNetwork(dsTrain,net.Layers,options);
Launching the code I get the following error:
Error using trainNetwork
Invalid network.
Error in Deep_Learning_Testing (line 2357)
[net,info] = trainNetwork(dsTrain,net.Layers,options);
Caused by:
Layer 'Decoder-Section-1-DepthConcatenation': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'Decoder-Section-2-DepthConcatenation': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'Decoder-Section-3-DepthConcatenation': Unconnected input. Each layer input must be connected to the output of another layer.
Layer 'Decoder-Section-4-DepthConcatenation': Unconnected input. Each layer input must be connected to the output of another layer.
Any idea why this error pops up?
Thanks,
Jacopo

采纳的回答

Parth Parikh
Parth Parikh 2023-3-6
Hi,
Mostly the error is due to DAGNet object is being passed to trainedNetwork, the input should be a layergraph object.
Instead of this: [net,info] = trainNetwork(dsTrain,net.Layers,options);
It should be: [net,info] = trainNetwork(dsTrain,layerGraph(net),options);
If you would like to know more about the hyperspectral/multispectral features than take a look at Hyperspectral Imaging library:

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Image Data Workflows 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by