Restart Training in Semantic Segmentation of Multispectral Images Using Deep Learning
1 view (last 30 days)
Show older comments
Jacopo Biasetti
on 4 Mar 2023
Answered: Parth Parikh
on 6 Mar 2023
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
0 Comments
Accepted Answer
Parth Parikh
on 6 Mar 2023
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 Comments
More Answers (0)
See Also
Categories
Find more on Computer Vision with Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!