Swift 输出层的大小与分类器中的类数不匹配?

Swift 输出层的大小与分类器中的类数不匹配?,swift,xcode,keras,coreml,apple-vision,Swift,Xcode,Keras,Coreml,Apple Vision,当我执行我的计算机视觉应用程序时,它会给我以下错误: "The size of the output layer 'output1' in the neural network does not match the number of classes in the classifier." 我的CNN接受过chars74K数据集的训练,只接受过26个大写字母的训练。我认为这意味着我的网络中有26个类,因此网络的输出层由26个具有softmax功能的神经元组成。我做错了什么?这是控制台中的其余文

当我执行我的计算机视觉应用程序时,它会给我以下错误:

"The size of the output layer 'output1' in the neural network does not match the number of classes in the classifier."
我的CNN接受过chars74K数据集的训练,只接受过26个大写字母的训练。我认为这意味着我的网络中有26个类,因此网络的输出层由26个具有softmax功能的神经元组成。我做错了什么?这是控制台中的其余文本:

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.}}}

使用coremltools转换模型时,具有类名的文件包含多于或少于26个标签