theano 安装 (windows 64bit python 2)
Posted
技术标签:
【中文标题】theano 安装 (windows 64bit python 2)【英文标题】:theano installation (windows 64bit python 2) 【发布时间】:2015-05-07 11:34:07 【问题描述】:我开始安装 theano。
我的电脑规格: - 操作系统:Windows 7 64 位 - 显卡:NVIDIA Geforce GT 630 - CPU : AMD FX-8120
我通过 deeplearning.net 的安装指南安装了 theano。 (http://deeplearning.net/software/theano/install_windows.html#configure-theano-for-gpu-use)
我成功完成了下的安装过程。
Visual Studio 2010 -> Windows 软件开发工具包版本 7.1 -> CUDA -> Microsoft Visual C++ Complier for Python 2.7(添加头文件)-> TDM GCC -> WinPython-64bit-2.7.9.4 -> env.bat -> Theano 设置
当我创建一个测试文件(下)并测试它时,它成功执行。
-------测试文件-----------------------------------
import numpy as np
import time
import theano
A = np.random.rand(1000,10000).astype(theano.config.floatX)
B = np.random.rand(10000,1000).astype(theano.config.floatX)
np_start = time.time()
AB = A.dot(B)
np_end = time.time()
X,Y = theano.tensor.matrices('XY')
mf = theano.function([X,Y],X.dot(Y))
t_start = time.time()
tAB = mf(A,B)
t_end = time.time()
print "NP time: %f[s], theano time: %f[s] (times should be close when run on CPU!)" %(np_end-np_start, t_end-t_start)
print "Result difference: %f" % (np.abs(AB-tAB).max(), )
但是当我添加 .theanorc.txt ---.theanorc.txt--------------------------------
[global]
device = gpu
floatX = float32
[nvcc]
flags = --use-local-env --cl-version=2008
它给了我这样的错误(下)
https://www.dropbox.com/s/gjspcpaz4hkeep8/11.PNG?dl=0
我对 CUDA-devicequery 和 nvidia-smi.exe 没有任何问题
--------------设备查询--------------------- -----
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.0\1_Utilities\deviceQuery\../../bin/win64/Debug/deviceQuery.exe Starting...
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: "GeForce GT 630"
CUDA Driver Version / Runtime Version 7.0 / 7.0
CUDA Capability Major/Minor version number: 2.1
Total amount of global memory: 512 MBytes (536870912 bytes)
( 2) Multiprocessors, ( 48) CUDA Cores/MP: 96 CUDA Cores
GPU Max Clock rate: 1620 MHz (1.62 GHz)
Memory Clock rate: 1600 Mhz
Memory Bus Width: 128-bit
L2 Cache Size: 131072 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65535),
3D=(2048, 2048, 2048)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 32768
Warp size: 32
Maximum number of threads per multiprocessor: 1536
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (65535, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: No
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
CUDA Device Driver Mode (TCC or WDDM): WDDM (Windows Display Driver Model)
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 1 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.0, CUDA Runtime Version = 7.0, NumDevs = 1, Device0 = GeForce GT 630
Result = PASS
--------------nvidia-smi.exe------ ---------
Thu May 07 20:21:50 2015
+------------------------------------------------------+
| NVIDIA-SMI 347.62 Driver Version: 347.62 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GT 630 WDDM | 0000:01:00.0 N/A | N/A |
| 50% 31C P12 N/A / N/A | 476MiB / 511MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 C Not Supported |
+-----------------------------------------------------------------------------+
请帮帮我..
【问题讨论】:
我将文件 ".theanorc.txt" 更改为 ".theanorc" 。谢谢你 。但它仍然有一个错误“没有检测到CUDA设备”。 【参考方案1】:您应该使用“.theanorc”文件,而不是“.theanorc.txt”。
您也可以在 theano-users 群中写下您的问题:https://groups.google.com/forum/#!forum/theano-users
下一个 Winpython 版本将包含 theano+mingwpy,因此它可能会降低设置的复杂性。
【讨论】:
你的意思是“.theanorc”吗?它没有用....我只是将“.theanorc.txt”文件放在winpython/setting文件夹中... 实际上,Theano 官方文档声明您可以使用“.theanorc”或“.theanorc.txt”,它声称是“让 Windows 用户的生活更轻松”deeplearning.net/software/theano/library/config.html跨度>以上是关于theano 安装 (windows 64bit python 2)的主要内容,如果未能解决你的问题,请参考以下文章