【问题标题】:caffe | Error parsing ... String literals cannot cross line boundaries咖啡 |解析错误...字符串文字不能跨越行边界
【发布时间】:2016-09-29 10:23:57
【问题描述】:

我想在我的数据集上微调 bvlc_reference_caffenet 模型。
我做了以下步骤:

  1. 我为我拥有的新数据集创建了 lmdb 文件。

  2. 我下载了预训练的bvlc_reference_caffenet.caffemodel

  3. 我改变了最后一层,即"fc8",全连接层:
    取了train_val.prototxt,把最后一层"fc8"改成"fc8_tune"

  4. 我将 num_output 更改为尝试预测的正确输出类数(即 2)。

  5. 我根据我的数据更改了solver.prototxt

  6. 我跑

    $TOOLS/caffe train --solver=solver.prototxt --weights=bvlc_reference_caffenet.caffemodel
    

但我收到以下错误

[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 363:19: String literals cannot cross line boundaries.
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 363:18: Message type "caffe.LayerParameter" has no field named "fc8_tune".
F0531 17:13:33.284981  3670 upgrade_proto.cpp:79] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: /caffe-master/models/bvlc_reference_caffenet/train_val.prototxt

谁能帮我解决这个错误?

【问题讨论】:

  • 非常感谢...Shai...:)..它正在工作。

标签: machine-learning neural-network protocol-buffers deep-learning caffe


【解决方案1】:

您忘记在 prototxt 文件中关闭引号 (")。
根据报错信息

解析文本格式 caffe.NetParameter 时出错:363:19:

你应该看看第 363 行。

【讨论】:

  • ....如果我想添加新层...我应该在 prototxt 文件中更改哪里。我想再添加两个层来检查性能,添加更多层后它将如何执行.你能建议我吗。
  • @BHAV247 在文件末尾添加图层
  • @BHAV247 这似乎是一个新问题。请照此发布,包含所有相关信息且格式正确。谢谢。
猜你喜欢
  • 2018-09-11
  • 2014-11-18
  • 2011-12-13
  • 1970-01-01
  • 1970-01-01
  • 2019-07-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多