【问题标题】:Error with Caffe C++ example with different deploy.prototxt file具有不同 deploy.prototxt 文件的 Caffe C++ 示例出错
【发布时间】:2015-11-21 08:28:12
【问题描述】:

trained 是一个使用 MNIST example architecture 的模型(但在我自己的 3 个图像类集上),并且一直在尝试将其集成到 C++ example 中。我修改了 MNIST 架构文件,使其类似于 C++ example (replacing the train and test layers with the input layer) 的 deploy.prototxt 文件。

不幸的是,当我运行 C++ 程序时,它给了我以下错误:

F0827 14:57:28.427697 25511 insert_splits.cpp:35] 未知的底部 blob 'label'(图层'accuracy',底部索引1)

我尝试用 Google 搜索它,我认为 MNIST 和 C++ 示例的文件中的层之间存在一些差异,但无法弄清楚我可以更改哪些内容来完成这项工作。

【问题讨论】:

  • 你去掉了accuracy和loss层吗?部署中不再需要它们。
  • 感谢您的帮助!这就是我所缺少的大部分内容:)

标签: c++ machine-learning neural-network deep-learning caffe


【解决方案1】:

正如AbdulRahman AlHamali's comment 所指出的,您似乎在deploy.prototxt 文件中留下了期望作为输入(“底部”)"label" 的损失和准确性层。
deploy.prototxt 中删除这些损失层应该可以解决问题。

请注意,如果您使用"SoftmaxWithLoss" 层作为损失,您需要将其替换"Softmax" 层以获得类概率作为净输出。 "Softmax" 层只需要一个"bottom",不需要bottom: "label"

【讨论】:

  • 解决了!非常感谢您的帮助!
  • 好的@Shai,谢谢。我现在正在尝试另一件事,我肯定会发布另一个问题并让你知道。我现在正在删除所有较旧的 cmets。
猜你喜欢
  • 2023-03-19
  • 2015-12-30
  • 2016-04-17
  • 2016-08-28
  • 2016-06-21
  • 2015-11-20
  • 1970-01-01
  • 1970-01-01
  • 2016-12-09
相关资源
最近更新 更多