I've tried to train Caffe using the Python interface as follows:
me@ARL-M6800:~/Caffe/caffe$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import caffe
>>> import os
>>> caffe_home='/home/me/Caffe/'
>>> MODEL_FILE = os.path.join(caffe_home,'caffe/examples/mnist/lenet.prototxt')
>>> solver = caffe.SGDSolver(MODEL_FILE)
WARNING: Logging before InitGoogleLogging() is written to STDERR
I0521 10:08:26.456539 7351 solver.cpp:26] SG!: About to ReadProtoFromTextFileOrDie from/home/me/Caffe/caffe/examples/mnist/lenet.prototxt # Note: I added this message to ensure I was tracing the code correctly
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.SolverParameter: 1:5: Message type "caffe.SolverParameter" has no field named "name".
F0521 10:08:26.459609 7351 io.hpp:54] Check failed: ReadProtoFromTextFile(filename, proto)
*** Check failure stack trace: ***
Aborted (core dumped)
I get the same result when I use lenet_train_test.prototxt as my model file.
When I look at lenet.prototxt and lenet_train_test.prototxt, the first line in each case is:
So, I don't really understand the error message.
I was trying to follow the suggestion given in issue#294 -
https://github.com/BVLC/caffe/pull/294solver = caffe.SGDSolver('solver.prototxt')
solver.net.set_input_arrays(data, labels)
solver.solve()
but seem to be missing something. If anyone has an idea, it would help me alot.
Thanks,
Steven