【三步】最⽅便最简洁的TensorFlow2.0GPU版本安装教程写在前⾯
1.你的电脑是有独⽴显卡的,⽀持GPU
2.你应该会下载安装 anaconda 并且应该会创建虚拟环境
版本问题
为了避免版本问题,请默认和我选择的版本匹配
开搞
第⼀步
输⼊conda install cudatoolkit=10.1
会提⽰你输⼊y回车就⾏
第⼆步
输⼊conda install cudnn=7.6
第三步网站制作
测试环节
输⼊python后
将以下代码分别输⼊
自适应网站模板企业# tf2.0版本
import tensorflowpat.v1 as tf
tf.disable_eager_execution()# 可以⽤于从TensorFlow 1.x到2.x的复杂迁移项⽬的程序开头
hello = tf.constant('hello,tf')
sess = tf.Session()
print(sess.run(hello))
成功!fortify是什么工具
如果想看与pycharm关联起
你接着看
pycharm python安装教程
第⼀步
第⼆步
第三步
这⾥说明⼀下,你刚才创建好了的TensorFlow虚拟环境,你得晓得在哪⾥,你才能添加进去⼀般情况
C:\Users\kingS\anaconda3\envs 你按着路径去,⼀般在anaconda3下的envs
C:\Users\kingS\anaconda3\envs 你按着路径去,⼀般在anaconda3下的envs
执行shell脚本的命令运⾏这段代码
# tf2.0版本
import tensorflowpat.v1 as tfconfigure system
tf.disable_eager_execution()# 可以⽤于从TensorFlow 1.x到2.x的复杂迁移项⽬的程序开头
hello = tf.constant('hello,tf')
sess = tf.Session()
print(sess.run(hello))