码迷,mamicode.com
首页 > Windows程序 > 详细

windows 10 + tensorflow-gpu 环境搭建

时间:2019-01-06 16:39:54      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:abs   source   bsp   cuda   安装完成   imp   without   完成   ssi   

参考:https://www.pugetsystems.com/labs/hpc/The-Best-Way-to-Install-TensorFlow-with-GPU-Support-on-Windows-10-Without-Installing-CUDA-1187/

 Install Anaconda Python

下载安装Anaconda, https://www.anaconda.com/download/

 安装完成后,在后面的步骤,在Anaconda Prompt中执行

Update Anaconda

conda update conda
conda update anaconda
conda update python
conda update --all

安装tensorflow-gpu

conda create --name tf-gpu   # Create a Python "virtual environment" for TensorFlow using conda
source activate tf-gpu       # 注意运行此命令后,命令行开头的提示变为(tf-gpu) user@computer:~$,表示tf-gpu环境处于激活状态
# 后面的命令,都在tf-gpu环境下执行,我保留了命令行的提示,以示区别
(tf-gpu) C:\Users\xxx> conda install tensorflow-gpu -y # install TensorFlow with GPU acceleration and all of the dependencies.

 测试安装的tensorflow-gpu

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

不出意外,运行结果会打印

‘Hello, TensorFlow!‘

 

 

windows 10 + tensorflow-gpu 环境搭建

标签:abs   source   bsp   cuda   安装完成   imp   without   完成   ssi   

原文地址:https://www.cnblogs.com/xbit/p/10228747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!