在Windows 10下构建Caffe(最新版本,仅CPU版本),以在VS C++项目中使用。为了使一切正常工作,需要做一些麻烦的事情。但是,在创建
Solver
类的实例时出现错误。SolverParameter solverParam;
ReadSolverParamsFromTextFileOrDie("solver.prototxt", &solverParam);
boost::shared_ptr<Solver<float>> solver(SolverRegistry<float>::CreateSolver(solverParam));
输出:
WARNING: Logging before InitGoogleLogging() is written to STDERR
F0601 14:21:42.943118 10832 solver_factory.cpp:29] Check failed: registry.count(type) == 1 (0 vs. 1) Unknown solver type: SGD (known types: )
*** Check failure stack trace: ***
solver.prototxt 内容:
net: "model.prototxt"
base_lr: 0.02
lr_policy: "step"
gamma: 0.5
stepsize: 500000
display: 10
max_iter: 5000
snapshot: 1000000
snapshot_prefix: "XORProblem"
solver_mode: CPU
test_iter: 1
test_interval: 2000
什么是原因?
make test
,然后再执行make runtest
(或类似的命令)。 - Shai