ubuntu-caffe

来源:互联网 发布:如何编写软件程序 编辑:程序博客网 时间:2024/05/16 09:19

install

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compilersudo apt-get install --no-install-recommends libboost-all-devsudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-devsudo apt-get install libblas-dev sudo apt-get install libatlas-dev sudo apt-get install liblapack-dev sudo apt-get install libatlas-base-devsudo pip install  easydictsudo pip install protobuf

fangli@fangli-dell:~/projects/caffe$ ./examples/mnist/create_mnist.sh
Creating lmdb…
build/examples/mnist/convert_mnist_data.bin: error while loading shared libraries: libcudart.so.7.5: cannot open shared object file: No such file or directory
build/examples/mnist/convert_mnist_data.bin: error while loading shared libraries: libcudart.so.7.5: cannot open shared object file: No such file or directory
Done.

solution:

try:

32-bit: sudo ldconfig /usr/local/cuda/lib

64-bit: sudo ldconfig /usr/local/cuda/lib64

http://stackoverflow.com/questions/10808958/why-cant-libcudart-so-4-be-found-when-compiling-the-cuda-samples-under-ubuntu

import caffe时出错:can not find module skimage.io

在命令行输入python;再输入import caffe时,可能会报以下错误:
can not find module skimage.io

此时只要按照以下命令操作即可:

$ sudo apt-get install python-numpy python-scipy python-matplotlib python-sklearn python-skimage python-h5py python-protobuf python-leveldb python-networkx python-nose python-pandas python-gflags Cython ipython$ sudo apt-get update

在caffe-master目录下:

$ make pycaffe

然后在命令行输入python;再输入import caffe就可以成功啦。

caffe中安装python:http://www.linuxdiyf.com/linux/15321.html
NVIDIA CuDNN安装说明:http://www.linuxdiyf.com/linux/11369.html
Caffe在Ubuntu 14.04 64bit下的安装:http://www.linuxdiyf.com/linux/13008.html
Caffe+Ubuntu 15.04+CUDA 7.0新手安装配置指南:http://www.linuxdiyf.com/linux/12708.html
Caffe+Ubuntu 14.04 64bit+CUDA 6.5配置说明:http://www.linuxdiyf.com/linux/11368.html

http://www.linuxdiyf.com/linux/15537.html

.bashrc

source /opt/ros/indigo/setup.bash

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/libexport PATH=$PATH:/usr/local/cuda/binexport LD_LIBRARY_PATH=:/usr/local/cuda/lib64export PYTHONPATH=/home/fangli/projects/caffe/python:$PYTHONPATH

LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lcblas
/usr/bin/ld: cannot find -latlas
collect2: error: ld returned 1 exit status

sudo apt-get install libatlas-dev
sudo apt-get install liblapack-dev
sudo apt-get install libatlas-base-dev

http://www.cnblogs.com/cj695/p/4498270.html

Check failed: registry.count(type) == 1 (0 vs. 1) Unknown layer type: Python (known types: AbsVal, Accuracy, ArgMax, BNLL, BatchNorm, BatchReindex, Bias, Concat, ContrastiveLoss, Convolution, Data, Deconvolution, Dropout, DummyData, ELU, Eltwise, Embed, EuclideanLoss, Exp, Filter, Flatten, HDF5Data, HDF5Output, HingeLoss, Im2col, ImageData, InfogainLoss, InnerProduct, LRN, Log, MVN, MemoryData, MultinomialLogisticLoss, PReLU, Pooling, Power, ROIPooling, ReLU, Reduction, Reshape, SPP, Scale, Sigmoid, SigmoidCrossEntropyLoss, Silence, Slice, SmoothL1Loss, Softmax, SoftmaxWithLoss, Split, TanH, Threshold, Tile, WindowData)
* Check failure stack trace: *
Aborted (core dumped)

使用faster-rcnn时,老是运行的cpu模式,解决办法
在每次检测时都加一句

def detect_object1(im):    caffe.set_mode_gpu()
0 0
原创粉丝点击