【Deep Learning】win10下无GPU配置tensorflow
2017-12-08 17:56
495 查看
要求: Win10 64位,装有vs201X的环境
步骤:
1.下载python
2.配置python环境变量
注意这里要把Scripts目录也要添加到环境变量path中3.以管理员身份运行windowsPowerShell
输入以下命令安装:pip3 install tensorflow
4.在命令行中进入python,然后在>>>后输入测试代码如下:
import tensorflow as tfwith tf.Session() as sess:
with tf.device(“/cpu:0”):
matrix1 = tf.constant([[3.0, 3.0]])
matrix2 = tf.constant([[2.0], [2.0]])
product = tf.matmul(matrix1, matrix2)
result = sess.run([product])
print(result)
上述代码实则定义了mat1(1*2的矩阵),mat2(2*1的矩阵),然后两矩阵相乘,执行过程交由tensorflow中的session.最后结果为12成功。
其他:可以在vscode文本环境下编写python代码,只需修改设置中的python路径即可,如
C:\Software\python\python.exe相关文章推荐
- 【Deep Learning】win10下配置tensorflow1.4(gpu版本)
- win10下 anaconda安装tensorflow,pycharm环境配置(gpu版)
- WIN10 64位+GTX1060配置tensorflow-GPU加速
- Tensorflow(GPU) 在Win10+Cuda8.0环境下安装以及Cudnn包配置 图文详细教程
- win10配置TensorFlow GPU出现Failed to load the native TensorFlow runtime."
- Win10 配置tensorflow1.3 GPU版本以及tensorboard的使用
- Win10 配置 TensorFlow-gpu 深度学系框架
- win10 配置tensorflow(GPU) anaconda3 cuda9.0 cudnn for 9.0
- 在win10下安装配置tensorflow_gpu版本(简单)
- Win10中TensorFlow的GPU环境的配置
- win10内置Linux子系统安装GPU版本TensorFlow
- Win10 Anaconda 安装tensorflow-gpu遇到的问题以及解决方案
- tensorflow52 win10 vs2015 编译 tensorflow1.2.0-rc0(支持GPU)
- Deep learning加速之Theano的安装和GPU的配置
- WIN10下使用Anaconda配置opencv、tensorflow、pygame并在pycharm中运用
- Ubuntu 16.04安装配置TensorFlow GPU版本
- win10系统搭建tensorflow1.2-GPU遇到的两个问题及解决方法。
- Tensorflow1.4.0(GPU)+Win10+Anaconda5.0.1+CUDA8.0+cuDNN6.0+Python3.6深度学习环境安装
- win10上安装GPU_tensorflow
- Tensorflow的GPU配置:mnist例子的运行