CAFFE 成功MAKE成功后,make runtest 出现了大量的错误

               

CAFFE深度学习交流群:532629018

 

CXX src/caffe/test/test_data_transformer.cpp

 

CXX src/caffe/test/test_filler.cpp
CXX src/caffe/test/test_syncedmem.cpp
CXX src/caffe/test/test_mvn_layer.cpp
CXX src/caffe/test/test_solver.cpp
CXX src/caffe/test/test_inner_product_layer.cpp
CXX src/caffe/test/test_hdf5data_layer.cpp
CXX src/caffe/test/test_data_layer.cpp
CXX src/caffe/test/test_platform.cpp
CXX src/caffe/test/test_image_data_layer.cpp
CXX src/caffe/test/test_threshold_layer.cpp
CXX src/caffe/test/test_tanh_layer.cpp
CXX src/caffe/test/test_random_number_generator.cpp
CXX src/caffe/test/test_concat_layer.cpp
CXX src/caffe/test/test_lrn_layer.cpp
CXX src/caffe/test/test_argmax_layer.cpp
CXX src/caffe/test/test_euclidean_loss_layer.cpp
CXX src/caffe/test/test_benchmark.cpp
CXX src/caffe/test/test_accuracy_layer.cpp
CXX src/caffe/test/test_stochastic_pooling.cpp
CXX src/caffe/test/test_eltwise_layer.cpp
CXX src/caffe/test/test_sigmoid_cross_entropy_loss_layer.cpp
CXX src/caffe/test/test_power_layer.cpp
CXX src/caffe/test/test_net.cpp
CXX src/caffe/test/test_im2col_layer.cpp
CXX src/caffe/test/test_protobuf.cpp
CXX src/caffe/test/test_contrastive_loss_layer.cpp
CXX src/caffe/test/test_hdf5_output_layer.cpp
CXX src/caffe/test/test_hinge_loss_layer.cpp
CXX src/caffe/test/test_maxpool_dropout_layers.cpp
CXX src/caffe/test/test_split_layer.cpp
CXX src/caffe/test/test_util_blas.cpp
CXX src/caffe/test/test_math_functions.cpp
CXX src/caffe/test/test_infogain_loss_layer.cpp
CXX src/caffe/test/test_softmax_with_loss_layer.cpp
CXX src/caffe/test/test_memory_data_layer.cpp
CXX src/caffe/test/test_internal_thread.cpp
CXX src/caffe/test/test_dummy_data_layer.cpp
CXX src/caffe/test/test_roi_pooling_layer.cpp
src/caffe/test/test_roi_pooling_layer.cpp:28:26: error: ‘FloatGPU’ was not declared in this scope
 typedef ::testing::Types<FloatGPU, DoubleGPU> TestDtypesGPU;
                          ^
src/caffe/test/test_roi_pooling_layer.cpp:28:36: error: ‘DoubleGPU’ was not declared in this scope
 typedef ::testing::Types<FloatGPU, DoubleGPU> TestDtypesGPU;
                                    ^
src/caffe/test/test_roi_pooling_layer.cpp:28:45: error: template argument 1 is invalid
 typedef ::testing::Types<FloatGPU, DoubleGPU> TestDtypesGPU;
                                             ^
src/caffe/test/test_roi_pooling_layer.cpp:28:45: error: template argument 2 is invalid
In file included from src/caffe/test/test_roi_pooling_layer.cpp:21:0:
./include/caffe/test/test_caffe_main.hpp: In instantiation of ‘class caffe::MultiDeviceTest<int>’:
src/caffe/test/test_roi_pooling_layer.cpp:31:7:   required from ‘class caffe::ROIPoolingLayerTest<int>’
src/caffe/test/test_roi_pooling_layer.cpp:90:1:   required from ‘class caffe::ROIPoolingLayerTest_TestGradient_Test<int>’
./src/gtest/gtest.h:7334:28:   required from ‘static bool testing::internal::TypeParameterizedTest<Fixture, TestSel, Types>::Register(const char*, const char*, const char*, int) [with Fixture = caffe::ROIPoolingLayerTest; TestSel = testing::internal::TemplateSel<caffe::ROIPoolingLayerTest_TestGradient_Test>; Types = testing::internal::Types1<int>]’
src/caffe/test/test_roi_pooling_layer.cpp:90:1:   required from here
./include/caffe/test/test_caffe_main.hpp:33:37: error: ‘int’ is not a class, struct, or union type
   typedef typename TypeParam::Dtype Dtype;
                                     ^
src/caffe/test/test_roi_pooling_layer.cpp: In instantiation of ‘class caffe::ROIPoolingLayerTest<int>’:
src/caffe/test/test_roi_pooling_layer.cpp:90:1:   required from ‘class caffe::ROIPoolingLayerTest_TestGradient_Test<int>’
./src/gtest/gtest.h:7334:28:   required from ‘static bool testing::internal::TypeParameterizedTest<Fixture, TestSel, Types>::Register(const char*, const char*, const char*, int) [with Fixture = caffe::ROIPoolingLayerTest; TestSel = testing::internal::TemplateSel<caffe::ROIPoolingLayerTest_TestGradient_Test>; Types = testing::internal::Types1<int>]’
src/caffe/test/test_roi_pooling_layer.cpp:90:1:   required from here
src/caffe/test/test_roi_pooling_layer.cpp:32:37: error: ‘int’ is not a class, struct, or union type
   typedef typename TypeParam::Dtype Dtype;
                                     ^
src/caffe/test/test_roi_pooling_layer.cpp:81:22: error: ‘int’ is not a class, struct, or union type
   Blob<Dtype>* const blob_bottom_data_;
                      ^
src/caffe/test/test_roi_pooling_layer.cpp:82:22: error: ‘int’ is not a class, struct, or union type
   Blob<Dtype>* const blob_bottom_rois_;
                      ^
src/caffe/test/test_roi_pooling_layer.cpp:83:22: error: ‘int’ is not a class, struct, or union type
   Blob<Dtype>* const blob_top_data_;
                      ^
src/caffe/test/test_roi_pooling_layer.cpp:84:24: error: ‘int’ is not a class, struct, or union type
   vector<Blob<Dtype>*> blob_bottom_vec_;
                        ^
src/caffe/test/test_roi_pooling_layer.cpp:85:24: error: ‘int’ is not a class, struct, or union type
   vector<Blob<Dtype>*> blob_top_vec_;
                        ^
src/caffe/test/test_roi_pooling_layer.cpp: In instantiation of ‘caffe::ROIPoolingLayerTest<TypeParam>::ROIPoolingLayerTest() [with TypeParam = int]’:
src/caffe/test/test_roi_pooling_layer.cpp:90:1:   required from ‘testing::Test* testing::internal::TestFactoryImpl<TestClass>::CreateTest() [with TestClass = caffe::ROIPoolingLayerTest_TestGradient_Test<int>]’
src/caffe/test/test_roi_pooling_layer.cpp:103:1:   required from here
src/caffe/test/test_roi_pooling_layer.cpp:38:41: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_data_’
         blob_top_data_(new Blob<Dtype>()) {
                                         ^
src/caffe/test/test_roi_pooling_layer.cpp:38:41: error: ‘int’ is not a class, struct, or union type
src/caffe/test/test_roi_pooling_layer.cpp:38:41: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
src/caffe/test/test_roi_pooling_layer.cpp:38:41: error: ‘int’ is not a class, struct, or union type
src/caffe/test/test_roi_pooling_layer.cpp:38:41: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_top_data_’
src/caffe/test/test_roi_pooling_layer.cpp:38:41: error: ‘int’ is not a class, struct, or union type
src/caffe/test/test_roi_pooling_layer.cpp:42:27: error: ‘int’ is not a class, struct, or union type
     GaussianFiller<Dtype> filler(filler_param);
                           ^
src/caffe/test/test_roi_pooling_layer.cpp:42:27: error: ‘int’ is not a class, struct, or union type
src/caffe/test/test_roi_pooling_layer.cpp:43:5: error: ‘class caffe::ROIPoolingLayerTest<int>’ has no member named ‘blob_bottom_data_’
     filler.Fill(this->blob_bottom_data_);
     ^
src/caffe/test/test_roi_pooling_layer.cpp:47:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_vec_’
     blob_bottom_vec_.push_back(blob_bottom_data_);
     ^
src/caffe/test/test_roi_pooling_layer.cpp:47:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_data_’
src/caffe/test/test_roi_pooling_layer.cpp:49:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[0 + 5*i] = 0; //caffe_rng_rand() % 4;
     ^
src/caffe/test/test_roi_pooling_layer.cpp:50:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[1 + 5*i] = 1; // x1 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:51:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[2 + 5*i] = 1; // y1 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:52:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[3 + 5*i] = 6; // x2 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:53:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[4 + 5*i] = 6; // y2 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:55:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[0 + 5*i] = 2;
     ^
src/caffe/test/test_roi_pooling_layer.cpp:56:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[1 + 5*i] = 6; // x1 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:57:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[2 + 5*i] = 2; // y1 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:58:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[3 + 5*i] = 7; // x2 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:59:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[4 + 5*i] = 11; // y2 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:61:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[0 + 5*i] = 1;
     ^
src/caffe/test/test_roi_pooling_layer.cpp:62:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[1 + 5*i] = 3; // x1 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:63:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[2 + 5*i] = 1; // y1 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:64:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[3 + 5*i] = 5; // x2 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:65:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[4 + 5*i] = 10; // y2 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:67:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[0 + 5*i] = 0;
     ^
src/caffe/test/test_roi_pooling_layer.cpp:68:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[1 + 5*i] = 3; // x1 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:69:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[2 + 5*i] = 3; // y1 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:70:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[3 + 5*i] = 3; // x2 < 8
     ^
src/caffe/test/test_roi_pooling_layer.cpp:71:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     blob_bottom_rois_->mutable_cpu_data()[4 + 5*i] = 3; // y2 < 12
     ^
src/caffe/test/test_roi_pooling_layer.cpp:73:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_vec_’
     blob_bottom_vec_.push_back(blob_bottom_rois_);
     ^
src/caffe/test/test_roi_pooling_layer.cpp:73:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
src/caffe/test/test_roi_pooling_layer.cpp:74:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_top_vec_’
     blob_top_vec_.push_back(blob_top_data_);
     ^
src/caffe/test/test_roi_pooling_layer.cpp:74:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_top_data_’
src/caffe/test/test_roi_pooling_layer.cpp: In instantiation of ‘caffe::ROIPoolingLayerTest<TypeParam>::~ROIPoolingLayerTest() [with TypeParam = int]’:
src/caffe/test/test_roi_pooling_layer.cpp:90:1:   required from ‘testing::Test* testing::internal::TestFactoryImpl<TestClass>::CreateTest() [with TestClass = caffe::ROIPoolingLayerTest_TestGradient_Test<int>]’
src/caffe/test/test_roi_pooling_layer.cpp:103:1:   required from here
src/caffe/test/test_roi_pooling_layer.cpp:77:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_data_’
     delete blob_bottom_data_;
     ^
src/caffe/test/test_roi_pooling_layer.cpp:78:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_bottom_rois_’
     delete blob_bottom_rois_;
     ^
src/caffe/test/test_roi_pooling_layer.cpp:79:5: error: using invalid field ‘caffe::ROIPoolingLayerTest<TypeParam>::blob_top_data_’
     delete blob_top_data_;
     ^
src/caffe/test/test_roi_pooling_layer.cpp: In instantiation of ‘void caffe::ROIPoolingLayerTest_TestGradient_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = int]’:
src/caffe/test/test_roi_pooling_layer.cpp:103:1:   required from here
src/caffe/test/test_roi_pooling_layer.cpp:91:37: error: ‘caffe::ROIPoolingLayerTest_TestGradient_Test<int>::TypeParam {aka int}’ is not a class, struct, or union type
   typedef typename TypeParam::Dtype Dtype;
                                     ^
src/caffe/test/test_roi_pooling_layer.cpp:97:26: error: ‘int’ is not a class, struct, or union type
   ROIPoolingLayer<Dtype> layer(layer_param);
                          ^
src/caffe/test/test_roi_pooling_layer.cpp:98:26: error: ‘int’ is not a class, struct, or union type
   GradientChecker<Dtype> checker(1e-4, 1e-2);
                          ^
src/caffe/test/test_roi_pooling_layer.cpp:98:26: error: ‘int’ is not a class, struct, or union type
src/caffe/test/test_roi_pooling_layer.cpp:97:26: error: ‘int’ is not a class, struct, or union type
   ROIPoolingLayer<Dtype> layer(layer_param);
                          ^
src/caffe/test/test_roi_pooling_layer.cpp:99:3: error: ‘class caffe::ROIPoolingLayerTest_TestGradient_Test<int>’ has no member named ‘blob_bottom_vec_’
   checker.CheckGradientExhaustive(&layer, this->blob_bottom_vec_,
   ^
src/caffe/test/test_roi_pooling_layer.cpp:99:3: error: ‘class caffe::ROIPoolingLayerTest_TestGradient_Test<int>’ has no member named ‘blob_top_vec_’
Makefile:501: recipe for target '.build_release/src/caffe/test/test_roi_pooling_layer.o' failed

 

make: *** [.build_release/src/caffe/test/test_roi_pooling_layer.o] Error 1

 

 

 

*************************解决以上问题的方法*************************************

出现上面的问题,可能是按照下面的方法做的:

 

cd caffe
cp Makefile.config.example Makefile.config
make all
make test
make runtest

 

然后就出现了这样的问题。我们应该按照以下的办法再来编译一下CAFFE 。也许不会出现上面的错误了。

 

Not sure about your problem, by the way, I build caffe by

cd caffe


cp Makefile.config.example Makefile.config


and change setting in Makefile.config


mkdir build


cd build


cmake ..

./configure (??not sure??)


make all

 

without using a build folder, for me there will be linking problem says libcaffe.o cant not find "xxx"

 

 

 

 

还有一种方法可以一试:

 

到CAFFE文件夹, 使用模板写个Makefile.config. 具体就是先复制一下模板, 再改一些内容(我喜欢用EMACS).

cp Makefile.config.example Makefile.config

-因为CPU MODE, 所以在CPU_ONLY := 1前面的#要去掉.

-两个路径要改成这样:(添加后面的两个hdf5的路径, 否则编译时报hdf5错误)

# Whatever else you find you need goes here.

INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial

LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial

 

准备好了.

make pycaffe

make all

make test

make runtest

--结果显示ALL TESTS PASSED就安装好了, 只需要再加上一个PYTHONPATH; 

另外, 这个make默认是用CPU单任务运算,如果想要快一点, 比如我想使4个任务, 在make后面加上-j4标签.

如果上面4行某一行报错之后想要重试,建议先make clean再重新开始.

 

这是一种再次编译的方法。主要是再次指定库文件 。或许可以解决问题。

 

 

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值