博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Configure Theano in Windows 8.1 x64
阅读量:4497 次
发布时间:2019-06-08

本文共 1884 字,大约阅读时间需要 6 分钟。

Configure Theano in Windows 8.1

1. Install CUDA Toolkit

  CUDA 6.5:

  Choose Windows 8.1 Desktop 64-bit EXE

2. Install Python and Theano related packages:

  Install Anaconda: 

  Choose Python 2.7 64-bit version.

3. Anaconda may not include MinGW package, install manually using Conda if nessesary:

  Script: conda install -c https://conda.anaconda.org/anaconda mingw

4. Install Theano using PIP

  Script: pip install theano

5. Check using test script:

import theano.tensor as Tfrom theano import functionx = T.dscalar('x')y = T.dscalar('y')z = x + yf = function([x,y],z)print f(2,3)

  If error like 'undefined reference to `__imp__Py_TrueStruct' occured, consider: 

  Execute:

    gendef python27.dll

    dlltool --as-flags=--64 -m i386:x86-64 -k --output-lib libpython27.a --input-def python27.def

  Copy libpython27.a to Anaconda\libs

 Extra: configurarion file for Theano:

  create .theanorc.txt file under C:\Users\UserName\

[blas]ldflags =[global] floatX = float32device = gpu# By default the compiled files were being written to my local network drive.# Since I have limited space on this drive (on a school's network),# we can change the path to compile the files on the local machine.# You will have to create the directories and modify according to where you # want to install the files. # Uncomment if you want to change the default path to your own.# base_compiledir = /local-scratch/jer/theano/[nvcc]fastmath = Trueflags = -LE:\Anaconda\libscompiler_bindir=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin[gcc]cxxflags = -IE:\Anaconda\MinGW[cuda]# Set to where the cuda drivers are installed.# You might have to change this depending where your cuda driver/what version is installed.

 

Just in case you want to install Keras:

Update Theano: pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git

 

转载于:https://www.cnblogs.com/StandFast/p/5024036.html

你可能感兴趣的文章
win7 实用
查看>>
Entity Framework Core 导航属性 加载数据
查看>>
String中的equals方法解析 jdk1.7
查看>>
Block详解
查看>>
Luogu P2467 [SDOI2010]地精部落 | 神奇的dp
查看>>
不可变类小结
查看>>
syslog-ng应用详解
查看>>
关于类加载器
查看>>
XCode: duplicate symbol 解决方案
查看>>
iOS状态栏设置详解!
查看>>
编程习惯1
查看>>
【读书笔记】iOS-给模拟器相册增加图片
查看>>
【Silverlight实例】Silverlight与Access数据库的互操作
查看>>
Java实现AES加密,异常java.security.InvalidKeyException: Illegal key size 的解决
查看>>
ActionMapping、ActionForward笔记
查看>>
带你入门机器学习
查看>>
fragment 重叠问题
查看>>
三层架构,四层模型
查看>>
[HAOI2008]硬币购物
查看>>
纯C语言跑分(详细注释)
查看>>