tensorflow安装

作者: liuqimother | 来源:发表于2018-01-29 12:26 被阅读0次

# 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

可能会有权限的问题,权限有问题请使用:

sudo pip install --upgrade --ignore-installed https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl

>>> import tensorflow as tf

>>> hello = tf.constant("hello world")

>>> sess = tf.Session()

>>> print sess.run(hello)

hello world

>>> a = tf.constant(10)

>>> b = tf.constant(32)

>>> print sess.run(a+b)

42

相关文章

网友评论

    本文标题:tensorflow安装

    本文链接:https://www.haomeiwen.com/subject/mydxzxtx.html