首页 > Windows开发 > 详细

win10 安装 tensorflow 并运行helloworld

时间:2017-04-09 21:13:13      阅读:371      评论:0      收藏:0      [点我收藏+]

win10 安装 tensorflow 并运行helloworld

 
折腾了一下,在win10上成功安装tensorflow.
1 下载安装python,注意一定要是64位(比如python-3.5.1-amd64)的,建议直接下载.exe版本的,在安装的时候选择添加环境变量;
2 下载最新的 tensorflow-1.1.0rc0-cp35-cp35m-win_amd64.whl 包;
3 输入命令pip install tensorflow-1.1.0rc0-cp35-cp35m-win_amd64.whl进行安装;
4 跑HellWorld进行测试;
 
技术分享
 
跑HelloWorld
 
import tensorflow as tf
matrix1 = tf.constant([[3., 3.]])
matrix2 = tf.constant([[2.], [2.]])
product = tf.matmul(matrix1, matrix2)
sess = tf.Session()
result = sess.run(product)
print (result)
sess.close()
 
技术分享





win10 安装 tensorflow 并运行helloworld

原文:http://www.cnblogs.com/jsxyhelu/p/6686236.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!