「TensorFlow」TensorFlow 安装与简单入门

作者: dongbingliu | 来源:发表于2018-07-10 19:15 被阅读45次

1. TensorFlow 官网

TensorFlow 官网:https://www.tensorflow.org/

2. TensorFlow 安装

2.1 注意事项:
① Python 必须为 64 位版本 3.6+:下载地址:
② 终端 pip 命令安装
安装仅支持 CPU 的 TensorFlow 版本,请输入以下命令:

pip3 install --upgrade tensorflow

要安装 GPU 版本的 TensorFlow,请输入以下命令:

pip3 install --upgrade tensorflow-gpu

2.2 验证 TensorFlow 安装
PyCharm IDE 中输入如下程序代码:

>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))

控制台输出:Hello, TensorFlow!

相关文章

网友评论

本文标题:「TensorFlow」TensorFlow 安装与简单入门

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