我的系统是ubuntu 14.04的。
在caffe 的安装过程中,我按照大部分人的博客去做了。
我第一次安装 ,1. make all , 2.make test 3 .make runtest 4. make pycaffe
这四部 都 没有错。
安装boost库的时候,默认安装了boost1.54版本的.
我尝试做了下更新,于是换到了1.58的版本。
我在boost的网站下载了1.58的版本,解压,编译,安装到电脑上。
# 解压,配置安装。过程不再复述。
可再次编译,在make runtest 时,出现了错误。
类似与这样:
src/caffe/test/test_gradient_based_solver.cpp:370: Failure
The difference between expected_updated_weight and solver_updated_weight is 1.1920928955078125e-07, which exceeds error_margin, where
expected_updated_weight evaluates to 9.6857547760009766e-06,
solver_updated_weight evaluates to 9.8049640655517578e-06, and
error_margin evaluates to 1.0000000116860974e-07.
[ FAILED ] NesterovSolverTest/2.TestNesterovLeastSquaresUpdateWithEverythingShare, where TypeParam = caffe::GPUDevice<float> (8073 ms)
[ RUN ] NesterovSolverTest/2.TestLeastSquaresUpdateWithEverythingAccumShare
[ OK ] NesterovSolverTest/2.TestLeastSquaresUpdateWithEverythingAccumShare (28 ms)
[ RUN ] NesterovSolverTest/2.TestNesterovLeastSquaresUpdateWithEverything
src/caffe/test/test_gradient_based_solver.cpp:370: Failure
The difference between expected_updated_weight and solver_updated_weight is 1.1920928955078125e-07, which exceeds error_margin, where
expected_updated_weight evaluates to 9.6857547760009766e-06,
solver_updated_weight evaluates to 9.8049640655517578e-06, and
error_margin evaluates to 1.0000000116860974e-07.
我在caffe 里找到了 很好的解释。
我在 第一次编译使,并没有设置 环境变量 export CUDA_VISIBLE_DEVICES=0
如果,你也遇到了 同样的错误。
请 设置 环境变量,重新 make runtest 即可。
祝你好运!!
贴出 原文: caffe解决问题编号为4229的错误