When I execute my computer vision app, it gives me the following error:
"The size of the output layer 'output1' in the neural network does not match the number of classes in the classifier."
My CNN has been trained on the chars74K dataset, and has been trained only on the 26 capital letters. I thought that meant that I had 26 classes in my network, and the output layer of my network therefore consists of 26 neurons with the softmax function. What am I doing wrong here? This is the rest of the text in the console:
2017-11-07 16:47:45.465734+0100 VisionApp[4472:347620] Error: The VNCoreMLTransform request failed
Error Domain=com.apple.vis Code=3 "The VNCoreMLTransform request failed" UserInfo={NSLocalizedDescription=The VNCoreMLTransform request failed, NSUnderlyingError=0x60000064fe40 {Error Domain=com.apple.CoreML Code=0 "The size of the output layer 'output1' in the neural network does not match the number of classes in the classifier." UserInfo={NSLocalizedDescription=The size of the output layer 'output1' in the neural network does not match the number of classes in the classifier.}}}
When you converted the model using coremltools, the file with class names contains more or fewer than 26 labels.