- This can be due to an issue with naming of layers in the code.
- Ensure that the layer you're trying to connect exists in the “lgraph” and its name is correctly spelled.
why yolov3 gave this error "Layer 'upsamsple1Detection2' does not exist"?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I download YOLO v3 from adds on in Mathwork page. However when I try to run the code to desgin the network using squeezenet network on Matlab 2020a it gave me this error "Layer 'upsamsple1Detection2' does not exist.". I attach the layer graph for last three steps.
Any help I will appreciate it.
%% Load the SqueezeNet network pretrained on Imagenet data set.
baseNetwork = squeezenet;
lgraph = squeezenetFeatureExtractor(baseNetwork, networkInputSize);
%% Then specify the class names, the number of object classes to detect,
% and number of prediction elements per anchor box, and add the detection
% heads to the feature extraction network
classNames = trainingDataTbl.Properties.VariableNames(2:end);
numClasses = size(classNames, 2);
numPredictorsPerAnchor = 5 + numClasses;
%% add detection heads first and second
lgraph = addFirstDetectionHead(lgraph, anchorBoxMasks{1}, numPredictorsPerAnchor);
lgraph = addSecondDetectionHead(lgraph, anchorBoxMasks{2}, numPredictorsPerAnchor);
%% Finally, connect the detection heads by connecting the first detection
% head to the feature extraction layer and the second detection head
% to the output of the first detection head.
lgraph = connectLayers(lgraph, 'fire9-concat', 'conv1Detection1');
lgraph = connectLayers(lgraph,'relu1Detection1','upsamsple1Detection2');
lgraph = connectLayers(lgraph,'fire5-concat','depthConcat1Detection22/in2');
analyzeNetwork (lgraph)
0 Commenti
Risposte (1)
Aneela
il 1 Apr 2024
Hi N. White,
The error "Layer 'upsamsple1Detection2' does not exist" you are facing suggests that there is no “upsamsple1Detection2” layer in the network.
It seems like there might be a typo in the layer name “upsamsple1Detection2.”
0 Commenti
Vedere anche
Categorie
Scopri di più su Sequence and Numeric Feature Data Workflows in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!