输出层的大小与分类器中类的个数不匹配?
The size of the output layer does not match the number of classes in the classifier?
当我执行我的计算机视觉应用程序时,出现以下错误:
"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 转换模型时,名称为 class 的文件包含多于或少于 26 个标签。
当我执行我的计算机视觉应用程序时,出现以下错误:
"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 转换模型时,名称为 class 的文件包含多于或少于 26 个标签。