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)