自己留着,省着忘了
配置Semantic Scene Completion from a Single Depth Image http://sscnet.cs.princeton.edu/
硬件:GPU Quadro M6000 24G
最开始配置了caffe+CUDA8.0+cuDNN6.0+Anaconda2+python2.7
http://www.cnblogs.com/zhbzz2007/p/5499180.html
http://blog.csdn.net/u012604811/article/details/53791222
install anaconda2
http://blog.csdn.net/c406495762/article/details/65449495?locationNum=2&fps=1
Matlab配置
http://blog.csdn.net/lcx543576178/article/details/51376008
然后发现cuDNN版本过新,会报一些参数过少的错误,cuDNN版本改成了“cudnn-8.0-linux-x64-v5.1.tgz”
然后开始了无知的爬坑之旅……
开始不了解,以为自己配置好了cafee,SSCNet给的caffe3d_suncg就不需要管它了……
结果
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0522 11:41:47.128919 31334 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface
W0522 11:41:47.128947 31334 _caffe.cpp:140] Use this instead (with the named "weights" parameter):
W0522 11:41:47.128952 31334 _caffe.cpp:142] Net('demo.txt', 1, weights='../models/suncg_ft_nyu.caffemodel')
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 7:20: Message type "caffe.LayerParameter" has no field named "suncg_data_param".
F0522 11:41:47.130220 31334 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: demo.txt
*** Check failure stack trace: ***
Aborted (core dumped)
发现问题是,可能并不需要自己编译caffe,而是直接编译作者给的caffe_code即可。
开始想把作者对层的定义和参数复制到源生caffe中,后来放弃。
第二个坑出现了,死活编译不过,错误如下:
In file included from /usr/include/c++/4.8/future:35:0, from /home/mobilear/sscnet/caffe_code/caffe3d_suncg/include/caffe/layers/suncg_data_layer.hpp:4, from /home/mobilear/sscnet/caffe_code/caffe3d_suncg/src/caffe/layers/suncg_data_layer.cu:5: /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ CMake Error at cuda_compile_generated_suncg_data_layer.cu.o.cmake:206 (message): Error generating /home/mobilear/sscnet/caffe_code/caffe3d_suncg/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_suncg_data_layer.cu.o
然后我在CMakeList.txt中加入
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_20;-std=c++11;-O2;-DVERBOSE") SET(CUDA_PROPAGATE_HOST_FLAGS OFF)
接着报错:
[ 1%] Built target proto
[ 1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/util/./cuda_compile_generated_math_functions.cu.o
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h(432): error: identifier "nullptr" is undefined
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h(432): error: expected a ";"
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h(190): error: expected a ";"
/usr/include/c++/4.8/exception(63): error: expected a ";"
/usr/include/c++/4.8/exception(68): error: expected a ";"
/usr/include/c++/4.8/exception(76): error: expected a ";"
/usr/include/c++/4.8/exception(83): error: expected a ";"
/usr/include/c++/4.8/exception(93): error: expected a "{"
/usr/include/c++/4.8/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"
/usr/include/c++/4.8/bits/exception_ptr.h(64): error: expected a "{"
/usr/include/c++/4.8/bits/exception_ptr.h(79): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(81): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(82): error: expected a ";"
/usr/include/c++/4.8/bits/exception_ptr.h(84): error: expected a ";"
/usr/include/c++/