美文网首页我爱编程
Tensorflow Install

Tensorflow Install

作者: Elinx | 来源:发表于2017-09-17 10:29 被阅读36次

    AI将会变得更加民主化, AI程序开发迟早会变为程序员的必备技能,还犹豫什么,赶紧来学习. Google的Tensorflow无疑是目前最有前景的框架, 那么Tensorflow到底好不好学呢?我们拭目以待. 本篇介绍Tensorflow的安装.

    安装

    环境的安装能够体现一个框架的易用性和框架开发者的功力, Google显然很擅长做框架,通过简单的几条命令,就装好了Tensorflow. 人生苦短,快用Python; Python环境冲突,来试试Anaconda. 运行下面几条命令就能安装好了.

    conda create -n tensorflow python=3.5
    source activate tensorflow
    conda install tensorflow ipython jupyter pandas
    

    测试

    $ 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
    >>>
    

    相关文章

      网友评论

        本文标题:Tensorflow Install

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