TX1入门教程软件篇-安装TensorFlow(0.11)
TX1入门教程软件篇-安装TensorFlow
说明:
- 介绍如何在TX1上安装TensorFlow
准备:
利用Jetpack安装如下:
- L4T 24.2.1 an Ubuntu 16.04 64-bit variant (aarch64)
- CUDA 8.0
- cuDNN 5.1.5
TensorFlow安装需要用到CUDA和cuDNN
TensorFlow占用比较多空间,TX1通常空间不足,最好增加64G+的U盘作为root分区启动,增加交换分区大小为8G+
安装:
- 下载脚本:
mkdir ~/dl
cd ~/dl
git clone https://github.com/jetsonhacks/installTensorFlowTX1.git
cd installTensorFlowTX1
- 使用/usr/local/lib库
$ ./setLocalLib.sh
- 安装依赖:
chmod +x installPrerequisites.sh
./installPrerequisites.sh
- 包含安装java,Protobuf,grpc-java ,Bazel等
- 下载tensorflow代码
$ ./cloneTensorFlow.sh
- 设置环境变量
$ ./setTensorFlowEV.sh
- 编译TensorFlow
$ ./buildTensorFlow.sh
- 打包成whl文件,放在$HOME目录下,如:tensorflow-0.11.0-py2-none-any.whl
$ ./packageTensorFlow.sh
- 安装whl文件
$ pip install $HOME/tensorflow-0.11.0-py2-none-any.whl
测试:
- 运行TensorFlow例子:
$ cd $HOME/tensorflow
$ time python tensorflow/models/image/mnist/convolutional.py
参考:
- https://github.com/tensorflow/tensorflow/
- https://github.com/tensorflow/tensorflow/issues/851
- http://www.jetsonhacks.com/2016/12/30/tensorflow-nvidia-jetson-tx1-development-kit/
- https://github.com/jetsonhacks/installTensorFlowTX1
- http://www.jetsonhacks.com/2016/12/30/install-tensorflow-on-nvidia-jetson-tx1-development-kit/
- http://www.jetsonhacks.com/2017/01/15/tensorflow-build-update-jetson-tx1/
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号