1. Install OpenCV
The tutorial mentioned in the previous blog is more useful, I installed the program to test OPENCV
[HTML] view plain copy g++show_image.c-o show_image ' Pkg-config–cflags–libs OpenCV '
There are the following errors:
[HTML] view plain copy error while loading shared Libraries:libxxx.so.x:cannot open share objectfile:no such fil E
Workaround:
Edit the/etc/ld.so.conf file, add a new row to the directory where the library files reside, and run Ldconfig to update the/etc/ld.so.cache
Then execute./show_image, the installation was successful.
2. Installation Lapack
Confirm that the Gfortran is installed
Sudoapt-get Install Gfortran
Download the latest LAPACK installation package on the LAPACK website
Http://www.netlib.org/lapack/lapack-3.5.0.tgz
After the download is complete decompression.
After decompression, there is a make.inc.example file in the directory below, which is changed to Make.inc.
(If you are a Gfortran compiler, you do not need to modify this file basically)
Put in the makefile file:
Lib:lapacklib Tmglib
#lib: Blaslib variants Lapacklib Tmglib
To
#lib: Lapacklib tmglib
Lib:blaslib variants Lapacklibtmglib
Then open the terminal, switch to the current directory (tip: You can drag the folder directly to the terminal will automatically fill in the file path), input: Sudomake can be.
There is no error in this operation.
Then copy the LIBLAPACK.A,LIBREFBLAS.A,LIBTMGLIB.A three libraries below the folder to/usr/lib
3. Installation of other dependencies
[HTML] view plain copy sudoapt-get install Libprotobuf-dev Libleveldb-dev Libsnappy-devlibopencv-dev Libboost-all-dev Libhdf5-serial-dev Libgflags-devlibgoogle-glog-dev Liblmdb-dev Protobuf-compiler
The problem appears as shown in the following illustration:
This took a lot of time to solve, and finally found a good way:
Http://hi.baidu.com/zhjixi495/item/5c0811de3937b4e6785daa64
Finally, it solves the problem:
4, in the compilation of Caffe encountered problems:
1) undefined reference to Cv::imread (Cv:sting,const&int)
An undefined reference to ' Cblas_ ... '
The main is to change the makefile.config in the library path problem: The main is to add a line of Library path: Library_dirs:=/usr/local/lib, which has the OPENCV library we need. So file and so on. Also changed the path of Python, mainly to find its corresponding location on the machine can be.
2 below this is a relatively low-level problem.
When doing CIFAR-10 training and learning this experiment in Caffe, the following commands are entered in the terminal:
[HTML] view plain copy cd$caffe_root/examples/cifar10./train_quick.sh
Unable to get the result of training, this is also very depressed, finally found that the tutorial has errors, it must be changed to the following command: [HTML] view plain copy cd$caffe_root./examples/cifar10/train_quick. Sh
The problem is resolved because the default current folder used in the file does not match the default folder for the former, and the corresponding file cannot be found.