
anaconda官网下载安装
2. 创建TensorFlow环境打开cmd,首先创建tensorflow 需要的环境
conda create -n tensorflow pip python=3.8
激活TensorFlow环境
activate tensorflow
3. 安装TensorFlow(国内源,速度飞快)
安装CPU版本输入
pipinstall --index-url https://pypi.douban.com/simple --ignore-installed --upgrade tensorflow
安装GPU版本输入
pipinstall --index-url https://pypi.douban.com/simple --ignore-installed --upgrade tensorflow-gpu
3. 测试
import tensorflow as tf
a=tf.ones(5)
print(a)
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)