0
点赞
收藏
分享

微信扫一扫

Mac下TensorFlow的部署和安装


  1. $ sudo easy_install pip
  2. $ sudo easy_install --upgrade six
  3. $ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0rc0-py2-none-any.whl
  4. 安装完成后,即可运行测试用例

$ python  
...
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>>


举报

相关推荐

0 条评论