zoukankan      html  css  js  c++  java
  • win10+Theano+GPU

    1. cuda + cudnn

    首先还是要先安装GPU库,具体和caffe安装中一样。

    2. Theano

    为防止下载速度慢,配置清华镜像

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    conda config --set show_channel_urls yes

    可以加上他们新推出的msys2第三方通道,代码如下:

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/

    安装依赖

    conda install pygpu theano

    这里可能会出现某些库下载失败的现象,那么复制链接直接下载好了,下载完后本地安装,例如:

    conda install --use-local m2w64-gcc-ada-5.3.0-6.tar.bz2

    再不行就换成

    pip install theano

    清理theano的缓存,如果出错,请保证theano没有在运行,实在不行就用管理员权限。如果出现问题,可以每次在编译失败后都使用这条指令。

    theano-cache purge

    最后,修改C:UsersAdministrator.theanorc.txt 文件

    [blas] 
    ldflags= 
    [gcc] 
    cxxflags = -IC:Anaconda2MinGWx86_64-w64-mingw32include
    
    [nvcc] 
    fastmath = True
    flags = -LC:Anaconda2libs
    compiler_bindir = C:Program Files (x86)Microsoft Visual Studio 12.0VCin  
    base_compiledir = path_to_a_directory_without_such_characters
    
    [lib]
    cnmem = 0.8
    
    [cuda]
    root = C:Program FilesNVIDIA GPU Computing ToolkitCUDAv9.0
    
    [global]
    device = cuda
    floatX = float32

    记得把cudnn放进cuda文件夹里

    受系统原因,可能有时候需要管理员运行IDE,不然会提示无法找到cudnn之类的错误。

  • 相关阅读:
    Git本地windows凭证账号更改
    解决vue ui创建项目很慢的原因
    跨域问题总结
    JS柯里化
    vue diff算法讲解
    当面试官问你闭包时,他究竟想听到些什么?
    JS中的 ==
    必须知道的 prototype, [[prototype]], __proto__
    Deepcopy in Javascript
    http问题整理
  • 原文地址:https://www.cnblogs.com/xuanyuyt/p/7011326.html
Copyright © 2011-2022 走看看