【问题标题】:The size of the output layer does not match the number of classes in the classifier?输出层的大小与分类器中的类数不匹配?
【发布时间】:2018-04-20 02:34:39
【问题描述】:

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

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

【问题讨论】:

    标签: swift xcode keras coreml apple-vision


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2021-03-08
      • 2021-06-20
      • 2021-03-21
      • 2016-08-26
      • 2014-06-19
      • 2017-10-09
      • 1970-01-01
      • 2016-07-03
      • 1970-01-01
      相关资源
      最近更新 更多