我想微调bvlc_reference_caffenet
我的数据集上的模型。
我执行了以下步骤:
我为我拥有的新数据集创建了 lmdb 文件。
我下载了预训练的
bvlc_reference_caffenet.caffemodel
。我更改了最后一层,即
“fc8”
,全连接层:
获取train_val.prototxt
并将最后一层“fc8”
更改为“fc8_tune”
。我将
num_output
更改为尝试预测的正确输出类数量(即 2)。我根据我的数据更改了
solver.prototxt
我运行
$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
谁能帮我解决这个错误?
最佳答案
您忘记在 prototxt
文件中关闭引号 ("
)。
根据错误信息
Error parsing text-format caffe.NetParameter: 363:19:
您应该查看第 363 行。
关于machine-learning - 咖啡 |解析错误...字符串文字不能跨行边界,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37545143/