TensorFlow安装(国内源,速度飞快)

TensorFlow安装(国内源,速度飞快),第1张

1. 安装anaconda,安装按各自需要安装就好

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)

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/799192.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-06
下一篇2022-05-06

发表评论

登录后才能评论

评论列表(0条)

    保存