sudo apt-get install git
sudo apt-get install build-essential
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
##sudo apt-get install --no-install-recommends libboost-all-dev 不一定安装
sudo apt-get install libatlas-base-dev
sudo apt-get install python-dev
下载caffe-master
git clone https://github.com/bvlc/caffe.git
回到caffe-master根目录
make -j2
make test
make runtest
MMIST训练
cd ~/caffe
下载MNIST数据库并解压缩
./data/mnist/get_mnist.sh
将其转换成Lmdb数据库格式
./examples/mnist/create_mnist.sh
将train_lenet.sh里的文件lenet_solver.prototxt的最后一项改成CPU
训练网络
./examples/mnist/train_lenet.sh
测试网络
./build/tools/caffe.bin test -model examples/mnist/lenet_train_test.prototxt -weights examples/mnist/lenet_iter_10000.caffemodel -iterations 100
Pycaffe配置
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 install protobuf-c-compiler protobuf-compiler
make pycaffe
在.bashrc最后添加
export PYTHONPATH=/home/administrator/caffe-master/python:$PYTHONPATH
sudo apt-get install build-essential
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
##sudo apt-get install --no-install-recommends libboost-all-dev 不一定安装
sudo apt-get install libatlas-base-dev
sudo apt-get install python-dev
下载caffe-master
git clone https://github.com/bvlc/caffe.git
更改makefile
sudo cp Makefile.config.example Makefile.config打开后设置为CPU运行,将#删除
CPU_ONLY = 1
回到caffe-master根目录
make -j2
make test
make runtest
MMIST训练
cd ~/caffe
下载MNIST数据库并解压缩
./data/mnist/get_mnist.sh
将其转换成Lmdb数据库格式
./examples/mnist/create_mnist.sh
将train_lenet.sh里的文件lenet_solver.prototxt的最后一项改成CPU
训练网络
./examples/mnist/train_lenet.sh
测试网络
./build/tools/caffe.bin test -model examples/mnist/lenet_train_test.prototxt -weights examples/mnist/lenet_iter_10000.caffemodel -iterations 100
Pycaffe配置
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 install protobuf-c-compiler protobuf-compiler
make pycaffe
在.bashrc最后添加
export PYTHONPATH=/home/administrator/caffe-master/python:$PYTHONPATH