zoukankan      html  css  js  c++  java
  • macbook安装cpu版tensorflow,pytorch,mxnet,keras

    环境:

    python2.7(anaconda环境)

    Mac OS X

    CPU only(mac无n卡)

     

    强大的anaconda环境管理方便安装各种包

    安装tensorflow(版本1.1.0)

    sudo conda install -c https://conda.anaconda.org/conda-forge tensorflow

     验证tensorflow是否安装成功

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

     

    安装pytorch(版本0.1.12)

    一个是 torch, 一个 torchvision, torch 是主模块, 用来搭建神经网络的, torchvision 是辅模块, 有数据库, 还有一些已经训练好的神经网络等着你直接用, 比如 (VGG, AlexNet, ResNet).

    sudo conda install -c soumith pytorch

    sudo conda install torchvision -c soumith

     

    安装mxnet(版本0.10.0)

    sudo conda install -c https://conda.anaconda.org/derickl mxnet-cpu

    安装keras(版本2.0.2)

    conda install -c https://conda.anaconda.org/conda-forge keras

    由于tensorflow版本太高,提示版本降级

    The following packages will be DOWNGRADED:
        tensorflow: 1.1.0-py27_0 conda-forge --> 1.0.0-py27_0 conda-forge

     

  • 相关阅读:
    水晶报表显示到aspx页面中
    Python 2.7获取网站源代码的几种方式_20160924
    Seal Report_20160923
    MySQL交叉表处理_20160923
    MySQL日期处理函数_20160922
    MySQL文本处理函数2_20160921
    kettle及数据库导数_20160920
    MySQL常用的数据类型及函数_20160920
    MySQL记录_20160919
    [vuex]
  • 原文地址:https://www.cnblogs.com/xmeo/p/7155445.html
Copyright © 2011-2022 走看看