最近开始学习TensorFlow,配置如下:
1、首先打开cmd,通过Anaconda创建一个名为tensorflow的python3.5环境
conda create -n tensorflow python=3.5
2、启动tensorflow环境
activate tensorflow
3、安装cpu版TensorFlow
pip install tensorflow-1.1.0rc2-cp35-cp35m-win_amd64.whl
如果不行,输入:
pip install tensorflow
4、测试tensorflow是否正确安装
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
sess.run(hello)
接下来是如何在Jupyter中使用TensorFlow:
1、进入tensorFlow环境,安装ipython和jupyter
conda install ipython
conda install jupyter
2、运行命令
ipython kernelspec install-self --user
3、进去Jupyter
jupyter notebook
import tensorflow as tf