tensorflow安装

作者: 陌上尘离 | 来源:发表于2018-05-21 15:30 被阅读0次

安装python3(本人安装的是p3环境是Ubuntu16.04)

sudo apt install python3-pip

安装tensorflow

sudo pip3 install tensorflow

安装结束后验证,创建一个文件hello_tensor.py,输入内容如下

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))

然后命令行键入:

python3 hello_tensor.py

引用博客:https://blog.csdn.net/zhqh100/article/details/77646497

相关文章

网友评论

    本文标题:tensorflow安装

    本文链接:https://www.haomeiwen.com/subject/elafjftx.html