@CrazyHenry
2018-01-20T14:10:59.000000Z
字数 914
阅读 1647
dldlTensorflow
- Author:李英民 | Henry
- E-mail: li
_yingmin@outlookdotcom- Home: https://liyingmin.wixsite.com/henry
快速了解我: About Me
转载请保留上述引用内容,谢谢配合!
这个我以前已经写过相关文档了。默认使用pip命令的时候:
因此,如果同时安装了pip2和pip3,则最好指明使用的pip命令。
$ sudo pip2 install tensorflow # Python 2.7; CPU support (no GPU support)$ sudo pip3 install tensorflow # Python 3.n; CPU support (no GPU support)$ sudo pip2 install tensorflow-gpu # Python 2.7; GPU support$ sudo pip3 install tensorflow-gpu # Python 3.n; GPU support
# Python2.7或者python3.5import tensorflow as tfhello = tf.constant('Hello, TensorFlow!')sess = tf.Session()print(sess.run(hello))
sess = tf.Session()之后会出现这种提示:
2018-01-19 18:11:51.114696: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA//其实这不是错误,只是一个提示,表示用源码编译会更快
