Ubuntu 14.04 + Tensorflow 1.0

1. 创建一个 conda 环境

conda create -n tf python=2.7 或者 conda create -n tf python=3.4

2. 激活这个conda环境并在里面安装TensorFlow

source activate tf
cpu版本:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp27-none-linux_x86_64.whl

GPU版本:
wget https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
sudo pip install tensorflow-0.9.0-cp27-none-linux_x86_64.whl

3.测试

import tensorflow as tf
hello = tf.constant('Hello,TensorFlow!')
sess = tf.Session()
sess.run(hello)
a = tf.constant(10)
b = tf.constant(32)
sess.run(a+b)

4.其他

  1. gpu版本
  2. ubuntu下查看cpu/GPU/内存使用率
sudo apt-get install htop

watch -n 1 nvidia-smi

Reference

  1. Ubuntu 14.04 64位安装 Google 的 Tensorflow
  2. Ubuntu下如何安装TensorFlow
  3. 调用tf.softmax_cross_entropy_with_logits函数出错解决
  4. ubuntu下查看CPU/GPU/内存使用率

Tensorflow

https://github.com/tensorflow/tensorflow

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...