TensorFlow学习1:centos7 安装TensorFl

2018-06-09  本文已影响0人  崔业康

1,查看python版本: python -V
2,安装epel扩展源:yum install epel-release
3,安装pip: yum install python-pip python-devel
4,安装tensorflow:pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
5,测试是否成功

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

yum install vim -y

展示行号

vim ~/.vimrc
写入:set nu

参考:人工智能实践:Tensorflow笔记

上一篇 下一篇

猜你喜欢

热点阅读