打开Anaconda Prompt:

 切换镜像(慢的话):

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/

切换后下载不了,切回默认源:

conda config --remove-key channels

创建环境:

conda create -n tensorflow pip python=3.9

激活tensorflow环境:

activate tensorflow

用conda安装tensorflow:

conda install tensorflow-gpu=2.6.0

测试安装是否成功:

import tensorflow as tf
tf.compat.v1.disable_eager_execution() #保证sess.run()能够正常运行
hello = tf.constant('hello,tensorflow')
sess= tf.compat.v1.Session()#版本2.0的函数
print(sess.run(hello))

输出b’Hello, TensorFlow!'就成功!

安装jupyter:

        //TODO

conda安装pytorch传送门

GitHub 加速计划 / te / tensorflow
184.54 K
74.12 K
下载
一个面向所有人的开源机器学习框架
最近提交(Master分支:25 天前 )
a49e66f2 PiperOrigin-RevId: 663726708 1 个月前
91dac11a This test overrides disabled_backends, dropping the default value in the process. PiperOrigin-RevId: 663711155 1 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐