Hi I'm new to DNN and I'm trying Caffe on windows 7. I have successfully compiled Caffe and also made train and test leveldb files of CIFAR10 and mean.binaryproto file. Now it's time to start train and test the CIFAR10, but when I try train, I get the errors that I couldn't solve even after googling long time..Please help!
Here's my version info : 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: ***
I also tried to update prototxt using upgrade_net_proto_binary, upgrade_net_proto_text, upgrade_solver_proto_text, I get the error...
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
After all those trials and errors, I got the answer.
For those who suffer the same thing, please refer.
at the solver file, I have indicated the source file and mean file to absolute address.
But the mistake I made is, I have written the address with \ not /.
Even I type in the command in cmd window with using \, in the prototxt, it does not allow it.
So you should write the address in prototxt file, with /.
i.e. C:/caffe-master/examples/cifar10/cifar10_full_train.prototxt.
Cheers.
Related
When I use LLVM 14.0.3 to build Linux Kernel v5.11.22 or v5.10.118 for aarch64, it reports the below error:
CC arch/arm64/kernel/vdso/vgettimeofday.o
/tmp/vgettimeofday-0dc7a1.s: Assembler messages:
/tmp/vgettimeofday-0dc7a1.s:15: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:15: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:16: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:17: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:18: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:19: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:25: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:25: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:50: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:151: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:191: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:236: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:277: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:382: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:382: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:746: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:747: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:748: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:749: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:750: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:757: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:757: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1063: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1063: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1155: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:1162: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1162: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1295: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1295: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1324: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1324: Error: junk at end of line, first unrecognized character is `2'
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
make[1]: *** [scripts/Makefile.build:279: arch/arm64/kernel/vdso/vgettimeofday.o] Error 1
make: *** [arch/arm64/Makefile:191: vdso_prepare] Error 2
Below are the build commands that I use:
make ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-gnu-
But I can build Linux Kernel v5.15.43 and the latest v5.18 by using the same build commands.
Also I tried LLVM 13.0.0, it can build Linux Kernel v5.11.22 for aarch64.
Pass LLVM_IAS=1 to kernel Makefile along with LLVM=-14 to ensure Clang use cross toolchain compatible for LLVM 14.x.x version.
I need to upload a CSV dump file to the Phoenix database
Files that did not contain any special characters were loaded without problems
./psql.py -t TTT localhost /home/isaev/output.csv -d';'
But as soon as I tried to load the same file in which the data fields were met with quotes, I get an error
java.lang.RuntimeException: java.io.IOException: (line 1) invalid char between encapsulated token and delimiter
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:398)
at org.apache.commons.csv.CSVParser$1.hasNext(CSVParser.java:407)
at org.apache.phoenix.util.UpsertExecutor.execute(UpsertExecutor.java:132)
at org.apache.phoenix.util.CSVCommonsLoader.upsert(CSVCommonsLoader.java:217)
at org.apache.phoenix.util.CSVCommonsLoader.upsert(CSVCommonsLoader.java:182)
at org.apache.phoenix.util.PhoenixRuntime.main(PhoenixRuntime.java:308)
Caused by: java.io.IOException: (line 1) invalid char between encapsulated token and delimiter
at org.apache.commons.csv.Lexer.parseEncapsulatedToken(Lexer.java:275)
at org.apache.commons.csv.Lexer.nextToken(Lexer.java:152)
at org.apache.commons.csv.CSVParser.nextRecord(CSVParser.java:450)
at org.apache.commons.csv.CSVParser$1.getNextRecord(CSVParser.java:395)
... 5 more
For example on the first line (line 1) I have this entry
5863355029;007320071; ZAO "With a smile for life";True;
I found the solution myself:
-q'\'
Can someone come in handy
You can resolve your problem using quotes 2 times:
5863355029;007320071; ZAO ""With a smile for life"";True;
Each field may or may not be enclosed in double quotes. If fields are not enclosed with double quotes, then double quotes may not appear inside the fields.
Check this link if you are interested in why: https://www.marklogic.com/blog/delimited_text_mlcp/
I have a fact in the format:
noun('08226txt').
and want it to work like my other facts such as
noun(directory).
noun(file).
noun(detail).
I can get it to work. It doesn't work without quotations and I'm sure its because its a string consisting of both letter and numbers. This is the error that is produced:
ERROR: Syntax error: Operator expected
ERROR: [the,command,types,the,file,0822
ERROR: ** here **
ERROR: 6txt] .
Any help appreciated, thankyou.
This is the line:
<%# Application Codebehind="Global.asax.cs" Inherits="WebApiTest" Language="C#" %>
generates:
Error 1 Illegal syntax. Expecting valid start name character.
Error 2 Character '%', hexadecimal value 0x25 is illegal in an XML name.
Error 3 The character '#', hexadecimal value 0x40 is illegal at the beginning of an XML name.
Error 4 Character '#', hexadecimal value 0x40 is illegal in an XML name.
Error 5 Missing attribute value on attribute 'Application'.
Error 6 Character '%', hexadecimal value 0x25 is illegal in an XML name.
yet it runs ok but would like to get rid of these errors, not sure how.
The code is correct. Checkout the default editor of your file in VS, maybe you are mistakenly using a standard XML editor for editing the *.asax file.
I've got a source code file, that started as a copy of some sample code from a webpage.
It was created and edited under Windows and compiled with no problems.
But under Mac's I get a load of obscure errors, like:
../MyProgram.cpp:1: error: stray '\255' in program
../MyProgram.cpp:1: error: stray '\254' in program
../MyProgram.cpp:1: error: stray '#' in program
../MyProgram.cpp:3:4: error: invalid preprocessing directive #i
../MyProgram.cpp:5:4: error: invalid preprocessing directive #i
../MyProgram.cpp:7:4: error: invalid preprocessing directive #i
../MyProgram.cpp:23: error: missing terminating ' character
../MyProgram.cpp:369:6: error: invalid preprocessing directive #i
../MyProgram.cpp:371:8: error: invalid preprocessing directive #i
../MyProgram.cpp:375:8: error: invalid preprocessing directive #e
../MyProgram.cpp:381:8: error: invalid preprocessing directive #e
../MyProgram.cpp:383:6: error: invalid preprocessing directive #e
../MyProgram.cpp:385:8: error: invalid preprocessing directive #i
../MyProgram.cpp:389:8: error: invalid preprocessing directive #e
../MyProgram.cpp:1: error: 'i' does not name a type
../MyProgram.cpp:53: error: 'V' does not name a type
../MyProgram.cpp:75: error: 'v' does not name a type
../MyProgram.cpp:157: error: 'l' does not name a type
../MyProgram.cpp:169: error: 'l' does not name a type
../MyProgram.cpp:187: error: 'i' does not name a type
../MyProgram.cpp:197: error: 'v' does not name a type
Looks like the problem is with some special characters.
How can I strip them off with *nix command line?
Looks to me as if the file was saved as UTF-16. Opening it in a text-editor and reencoding to UTF-8 should, with some luck, fix the problem.
Originally I was just going say how to remove the \255 & \254 characters, but I agree with the comments, it's in unicode.
try
iconv -f iso-8859-1 -t utf-8 infile > outfile
iso-8859-1 is just a guess.