TensorFlow no attribute 'is_abstract'

来源:互联网 发布:医学专业英语翻译软件 编辑:程序博客网 时间:2024/06/08 09:51
准备工作
# Ubuntu/Linux 64-bit$ sudo apt-get install python-pip python-dev# Mac OS X$ sudo easy_install pip
安装 TensorFlow :
# Ubuntu/Linux 64-bit, CPU only, Python 2.7:$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl# Ubuntu/Linux 64-bit, GPU enabled, Python 2.7. Requires CUDA toolkit 7.5 and CuDNN v4.# For other versions, see "Install from sources" below.$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl# Mac OS X, CPU only:$ sudo easy_install --upgrade six$ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl
如果是 Python3 :
# Ubuntu/Linux 64-bit, CPU only, Python 3.4:$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl# Ubuntu/Linux 64-bit, GPU enabled, Python 3.4. Requires CUDA toolkit 7.5 and CuDNN v4.# For other versions, see "Install from sources" below.$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl# Mac OS X, CPU only:$ sudo easy_install --upgrade six$ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py3-none-any.whl

测试代码
import tensorflow as tfhello = tf.constant('Hello, TensorFlow!')sess = tf.Session()print sess.run(hello)
遇到错误,解决,我使用的cpu安装,python2.7
sudo pip uninstall six
sudo pip install six --upgrade --target="/usr/lib/python2.7/dist-packages"
good luck!

阅读全文
0 0
原创粉丝点击