TK1入门教程软件篇-安装Caffe
TK1入门教程软件篇-安装Caffe
说明:
- 介绍如何在TK1安装Caffe
Caffe介绍:
- Caffe,全称Convolutional Architecture for Fast Feature Embedding,是一个计算CNN相关算法的框架
- 由Yangqing Jia老师编写和维护的,代替了之前的decaf工具。
- Caffe是用C++和Python实现的,并提供了C++、Python、Matlab的接口,目前有Linux 和Windows版
- Caffe 主页:http://caffe.berkeleyvision.org/
- Linux版Caffe下载:https://github.com/BVLC/caffe
- Windows版Caffe下载:https://github.com/niuzhiheng/caffe
安装准备:
- 利用Jetpack安装完整版本
- 或手工分别安装如下包:
- 安装CUDA
- 安装cuDNN
- 安装OpenCV
安装Caffe:
- 新建目录:
mkdir ~/Caffe
- 下载安装脚本
cd ~/Caffe
git clone https://gist.github.com/jetsonhacks/acf63b993b44e1fb9528
vim acf63b993b44e1fb9528/installCaffe.sh
- 脚本内容:
#!/bin/sh
# Install and compile Caffe on NVIDIA Jetson TK1 Development Kit
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install libprotobuf-dev protobuf-compiler gfortran \
libboost-dev cmake libleveldb-dev libsnappy-dev \
libboost-thread-dev libboost-system-dev \
libatlas-base-dev libhdf5-serial-dev libgflags-dev \
libgoogle-glog-dev liblmdb-dev -y
sudo usermod -a -G video $USER
# Git clone Caffe
sudo apt-get install -y git
git clone https://github.com/BVLC/caffe.git
cd caffe && git checkout dev
cp Makefile.config.example Makefile.config
make -j 4 all
make -j 4 runtest
build/tools/caffe time --model=models/bvlc_alexnet/deploy.prototxt --gpu=0
- sudo add-apt-repository universe 这行会添加源,如果不想更新源请注释掉
- 分配权限并执行安装
chmod +x acf63b993b44e1fb9528/installCaffe.sh
./acf63b993b44e1fb9528/installCaffe.sh
- 安装完成
参考:
- http://www.jetsonhacks.com/2015/01/20/nvidia-jetson-tk1-cudnn-install-caffe-example/
- https://gist.github.com/jetsonhacks/acf63b993b44e1fb9528
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号