gpt4 book ai didi

windows - 在 Windows Caffe 上训练 cifar10 时出现 libprotobuf 错误

转载 作者:可可西里 更新时间:2023-11-01 10:42:14 26 4
gpt4 key购买 nike

您好,我是 DNN 的新手,我正在 Windows 7 上试用 Caffe。我已经成功编译了 Caffe,还制作了 CIFAR10 和 mean.binaryproto 文件的训练和测试 leveldb 文件。现在是时候开始训练和测试 CIFAR10 了,但是当我尝试训练时,我得到了即使在谷歌搜索很长时间后也无法解决的错误。请帮忙!这是我的版本信息:Anaconda2、Cuda 7.5、Cudnn 4、Visual Studio 2013

C:\caffe-master\Build\x64\Release>caffe train -solver=cifar10_quick_solver.prototxt
[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 4:10: Invalid escape sequence in string literal.
[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 4:23: Invalid escape sequence in string literal.
[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 4:32: Invalid escape sequence in string literal.
[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 4:40: Invalid escape sequence in string literal.
[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 24:22: Invalid escape sequence in string literal.

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 24:35: Invalid escape sequence in string literal.

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 24:44: Invalid escape sequence in string literal.

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 24:52: Invalid escape sequence in string literal.

F1019 14:25:21.171140 5692 upgrade_proto.cpp:1063] Check failed: ReadProtoFromT
extFile(param_file, param) Failed to parse SolverParameter file: cifar10_quick_solver.prototxt
*** Check failure stack trace: ***

我还尝试使用 upgrade_net_proto_binary、upgrade_net_proto_text、upgrade_solver_proto_text 更新 prototxt,但出现错误...

C:\caffe-master\Build\x64\Release>upgrade_solver_proto_text c:\caffe-master\examples\cifar10\cifar10_full_solver.prototxt cifar10_full_new_solver.prototxt

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 25:22: Invalid escape sequence in string literal.

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 25:35: Invalid escape sequence in string literal.

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 25:44: Invalid escape sequence in string literal.

[libprotobuf ERROR ..\src\google\protobuf\text_format.cc:274] Error parsing text
-format caffe.SolverParameter: 25:52: Invalid escape sequence in string literal.

E1018 20:49:33.715873 5896 upgrade_solver_proto_text.cpp:30] Failed to parse in
put text file as SolverParameter: c:\caffe-master\examples\cifar10\cifar10_full_solver.prototxt

最佳答案

经过所有这些尝试和错误之后,我得到了答案。有同样遭遇的 friend 请指教。

在求解器文件中,我已将源文件和平均文件指定为绝对地址。但是我犯的错误是,我把地址写成了\而不是/。即使我在 cmd 窗口中使用\, 在 prototxt 中键入命令,它也不允许这样做。

所以你应该把地址写在prototxt文件中,带/。即 C:/caffe-master/examples/cifar10/cifar10_full_train.prototxt。

干杯。

关于windows - 在 Windows Caffe 上训练 cifar10 时出现 libprotobuf 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46823828/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com