错误:

 

caffe % ./build/tools/caffe train -solver models/finetune_flickr_style/solver.prototxt -weights models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel

I0403 18:09:40.822396 7323 caffe.cpp:113] Use GPU with device ID 0
F0403 18:09:40.822931 7323 common.cpp:55] Cannot use GPU in CPU-only Caffe: check mode.
*** Check failure stack trace: ***
@ 0x7f901eccedaa (unknown)
@ 0x7f901eccece4 (unknown)
@ 0x7f901ecce6e6 (unknown)
@ 0x7f901ecd1687 (unknown)
@ 0x7f901f0d5af0 caffe::Caffe::SetDevice()
@ 0x406312 train()
@ 0x404901 main
@ 0x7f901e1e0ec5 (unknown)
@ 0x404ead (unknown)
@ (nil) (unknown)

 

解决办法:

       

设置examples/mnist/lenet_solver.prototxt里的solver_mode从gpu改为cpu