TX2-安装tensorflow深度学习框架

9 篇文章 0 订阅
8 篇文章 0 订阅
本文档详细介绍了如何在TX2上安装TensorFlow v1.0.1,包括所需的L4T 27.1、CUDA 8.0和cuDNN 5.1.10环境,以及增大Swap交换区的步骤,确保顺利进行深度学习工作。
摘要由CSDN通过智能技术生成

准备:

  • L4T 27.1 an Ubuntu 16.04 64-bit variant (aarch64)
  • CUDA 8.0
  • cuDNN 5.1.10
  • TensorFlow安装需要用到CUDA和cuDNN
  • 安装的版本为:TensorFlow v1.0.1

增加Swap交换区的大小:

//创建脚本
$ mkdir ~/swap/
$ cd ~/swap/
$ vim createSwapFile.sh
//脚本内容如下
#!/bin/bash
#NVIDIA Jetson TX1 in 3D card
#Create a swapfile for Ubuntu at the current directory location
fallocate -l 4G swapfile
#List out the file
ls -lh swapfile
# Change permissions so that only root can use it
chmod 600 swapfile
#List out the file
ls -lh swapfile
#Set up the Linux swap area
mkswap swapfile
#Now start using the swapfile
swapon swapfile
#Show that it's now being used
swapon -s
//设置权限
$ chmod +x createSwapFile.sh
//执行
$ sudo ./createSwapFile.sh
//创建swap为4G大小swap文件。
//设置开机生效
$ sudo vim /etc/fstab
//内容如下
/home/ubuntu/swap/swapfile none swap sw 0 0


安装:

//下载脚本:
$ mkdir ~/tensorflow
$ cd ~/tensorflow
$ git clone https://github.com/ncnynl/installTensorFlowTX2.git
$ cd installTensorFlowTX2

//安装依赖:
//安装java,Protobuf,grpc-java ,Bazel等
$ chmod +x installPrerequisites.sh
$ ./installPrerequisites.sh

//下载tensorflow代码:
$ ./cloneTensorFlow.sh

//设置环境变量:
$ ./setTensorFlowEV.sh

//编译TensorFlow:
$ ./buildTensorFlow.sh
$ ./packageTensorFlow.sh

//安装whl文件:
$ pip install $HOME/tensorflow-1.0.1-cp27-cp27mu-linux_aarch64.whl

测试:

$ cd $HOME/tensorflow
$ time python tensorflow/models/image/mnist/convolutional.py


评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值