我是靠谱客的博主 活力砖头,这篇文章主要介绍tensorflow (一)hello Tensorflow 检验tensorflow是否成功安装,现在分享给大家,希望可以做个参考。

Python 3.5.2 |Anaconda 4.2.0 (64-bit)| (default, Jul  2 2016, 17:53:06) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> sess=tf.Session()
2018-11-05 15:13:12.817746: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2
>>> import tensorflow as tf
>>> hello = tf.constant('hello, Tensorflow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
b'hello, Tensorflow!'

终端运行的一个关于tensorflow的一个小demo,目的是检验自己的tensorflow

最后

以上就是活力砖头最近收集整理的关于tensorflow (一)hello Tensorflow 检验tensorflow是否成功安装的全部内容,更多相关tensorflow内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(133)

评论列表共有 0 条评论

立即
投稿
返回
顶部