Window使用Anaconda3创建tensorflow2.0的CPU版本
使用conda 新建环境
conda create -n tf2 python=3.7
进入环境
conda activate tf2
安装TF2.0 CPU版本
pip install tensorflow==2.0.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
需要等点时间
测试
python
import tensorflow as tf
version = tf.__version__
gpu_ok = tf.test.is_gpu_available()
print("tf version:",version,"\nuse GPU",gpu_ok)
CPU版本显示如下
gpu_ok = tf.test.is_gpu_available()
print("tf version:",version,"\nuse GPU",gpu_ok)
该博客介绍了如何通过Anaconda3在Windows上创建一个TensorFlow2.0的CPU版本环境。首先使用conda创建环境,然后激活环境,并通过pip安装指定版本的TensorFlow。最后,通过代码测试确认TensorFlow版本及GPU可用性。
5550

被折叠的 条评论
为什么被折叠?



