2017-10-19 120 views
2

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

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 prototxt更新,upgrade_net_proto_text,upgrade_solver_proto_text,我得到的错误...

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 

回答

0

经过所有这些试验和错误,我得到了答案。 对于那些遭受同样的事情,请参阅。

在解算器文件中,我已经指出源文件和平均文件为绝对地址。 但我犯的错误是,我用\ not /写了地址。 即使我在cmd窗口中使用\键入命令,在prototxt中,它不允许它。

所以你应该使用/在原型文件中写入地址。 即C:/caffe-master/examples/cifar10/cifar10_full_train.prototxt。

干杯。

+0

或者你可以写一个'\\'而不是一个'\\' – Shai