필터 지우기
필터 지우기

why yolov3 gave this error "Layer 'upsamsple1Detection2' does not exist"?

조회 수: 1 (최근 30일)
N.white
N.white 2021년 7월 11일
답변: Aneela 2024년 4월 1일
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)

답변 (1개)

Aneela
Aneela 2024년 4월 1일
Hi N. White,
The error "Layer 'upsamsple1Detection2' does not exist" you are facing suggests that there is no “upsamsple1Detection2” layer in the network.
  • 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.
It seems like there might be a typo in the layer name “upsamsple1Detection2.”
The correct name is “upsample1Detection2” according to the layer graph YOLOv3lgraph1.PNG .

카테고리

Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by