error with classes in network classification layer
显示 更早的评论
Hi all matlab folk,
I am seeking some assistance in solving this challenge and move forward! for some reason I am not getting this and I am in need of some assistance!
This error persists no matter if i set the classification layer to auto and I am finding it challenging to move past this phase of the network!
please see layers! then check the error at the bottom
thanx in advance!
Error using vision.internal.cnn.validation.checkNetworkClassificationLayer (line 11)
The number object classes in the network classification layer must be equal to the number of classes defined in the input
trainingData plus 1 for the "Background" class.
Error in trainRCNNObjectDetector>checkNetworkAndFillRemainingParameters (line 290)
vision.internal.cnn.validation.checkNetworkClassificationLayer(analysis, trainingData);
Error in trainRCNNObjectDetector (line 256)
params = checkNetworkAndFillRemainingParameters(trainingData, network, params);
Error in test19 (line 54)
rcnn = trainRCNNObjectDetector(Wgtruth, Newlayers, options, 'NegativeOverlapRange', [0 0.3])
>>
this is my layers
Newlayers = [
imageInputLayer([32 32 3],"Mean",[],"Normalization","zerocenter", "Name","imageinput")
convolution2dLayer([5 5],32,"Name","conv","BiasLearnRateFactor",2,"Padding",[2 2 2 2],"WeightsInitializer","narrow-normal")
maxPooling2dLayer([3 3],"Name","maxpool","Stride",[2 2])
reluLayer("Name","relu")
convolution2dLayer([5 5],32,"Name","conv_1","BiasLearnRateFactor",2,"Padding",[2 2 2 2],"WeightsInitializer","narrow-normal")
reluLayer("Name","relu_1")
averagePooling2dLayer([3 3],"Name","avgpool","Stride",[2 2])
convolution2dLayer([5 5],64,"Name","conv_2","BiasLearnRateFactor",2,"Padding",[2 2 2 2],"WeightsInitializer","narrow-normal")
reluLayer("Name","relu_2")
averagePooling2dLayer([3 3],"Name","avgpool_1","Stride",[2 2])
fullyConnectedLayer(64,"Name","fc","BiasLearnRateFactor",2,"WeightsInitializer","narrow-normal")
reluLayer("Name","relu_3")
fullyConnectedLayer(2,"Name","fc_rcnn","BiasL2Factor",1,"BiasLearnRateFactor",5,"WeightLearnRateFactor",8,"WeightsInitializer","narrow-normal")
softmaxLayer("Name","softmax")
classificationLayer('Name','classoutput')]
Newlayers(15)
Newlayers(14)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Object Detection 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!