TensorFlow下载与安装(Ubuntu)

来源:互联网 发布:淘宝搜索结果不对 编辑:程序博客网 时间:2024/05/17 23:06

Pip 安装TensorFlow

1、安装pip

# Ubuntu/Linux 64-bit$ sudo apt-get install python-pip python-dev

2、安装 TensorFlow

# Ubuntu/Linux 64-bit, CPU only, Python 2.7:$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl

3、运行 TensorFlow

打开一个 python 终端:

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

转自极客学院:http://wiki.jikexueyuan.com/project/tensorflow-zh/get_started/os_setup.html

原创粉丝点击