zoukankan      html  css  js  c++  java
  • Linux下安装theano

    http://deeplearning.net/software/theano/install_ubuntu.html#install-ubuntu

    以上链接为官网安装教程 

    在ubuntu中安装theano相对于在window上安装简单很多。

    如果你是Ubuntu 16.04系统

    安装流程如下:

    sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
    sudo pip install Theano
    
    # cuda 7.5 don't support the default g++ version. Install an supported version and make it the default.
    sudo apt-get install g++-4.9
    
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
    sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10
    
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
    sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 10
    
    sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30
    sudo update-alternatives --set cc /usr/bin/gcc
    
    sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30
    sudo update-alternatives --set c++ /usr/bin/g++
    
    # Work around a glibc bug
    echo -e "
    [nvcc]
    flags=-D_FORCE_INLINES
    " >> ~/.theanorc

    如果你是Ubuntu 11.10 到 14.04版本

    安装流程如下:

    sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git
    sudo pip install Theano

    如果你的版本是Ubuntu 11.04

    安装流程如下:

    sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ git libatlas3gf-base libatlas-dev
    sudo pip install Theano

    以上安装是基于python2 的

    在版本Ubuntu 14.04 上如果你想使用python3 请将上述的

    sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose g++ libopenblas-dev git

    修改为:

    sudo apt-get install python3-numpy python3-scipy python3-dev python3-pip python3-nose g++ libopenblas-dev git

    使用下述代码验证python包有没有安装成功

    1. NumPy (~30s): 
      python -c "import numpy; numpy.test()"
    2. SciPy (~1m): 
      python -c "import scipy; scipy.test()"
    3. Theano (~30m):
       python -c "import theano; theano.test()"
  • 相关阅读:
    C# Time Class using MySQL
    csharp: Double Convert To String
    csharp: 图片字符间距
    HtmlEntities
    csharp: Microsoft SqlHelper
    csharp: read excel using Aspose.Cells
    JAVA核心技术I---JAVA基础知识(命令行)
    JAVA核心技术I---JAVA基础知识(Jar文件导入导出)
    JAVA核心技术I---JAVA基础知识(package和import)
    JAVA核心技术I---JAVA基础知识(知识回顾)
  • 原文地址:https://www.cnblogs.com/zangyu/p/5571198.html
Copyright © 2011-2022 走看看