Windows8.1 64bit环境下搭建深度学习平台之CUDA安装与配置
http://blog.csdn.net/baigoocn/article/details/36188029
說明:想要讓Theano在Windows8.1下能利用GPU并行運(yùn)算,必須有支持GPU并行運(yùn)算的Nvidia顯卡,且要安裝CUDA,千萬不要電腦上是Intel或AMD的顯卡,卻要編寫CUDA。
文中用到的所有軟件均共享在百度云盤中,方便大家的使用!! 鏈接:http://pan.baidu.com/s/1dD4APIL?密碼:8bk5
一、CUDA的安裝
1、查看你的顯卡是否支持GPU并行運(yùn)算
"This PC"/"Manage"/"Device Manager"/"Display adapters",就可看到自己顯卡的型號(hào).
然后對(duì)照該網(wǎng)址中支持GPU運(yùn)算的網(wǎng)卡型號(hào)清單,看自己的Nvidia顯卡是否在其列表中.
2、下載安裝CUDA Toolkit
CUDA Toolkit下載地址:點(diǎn)我下載,注意選擇既要與自己系統(tǒng)匹配又要與所安裝Python的版本相匹配的版本,就是說要么都用32位的,要么都用64位的,在此選擇的是Windows 8.1 64bit桌面版.
文件將近1G左右,下載完成后雙擊exe可執(zhí)行文件即可進(jìn)行安裝,安裝過程略過。
二、.theanorc.txt文件的配置
在Home目錄下(cmd命令框下可以看到,如我的是"C:\Users\leiguo"),創(chuàng)建.theanorc.txt文件,文件的內(nèi)容如下:
畫黃線的是容易出錯(cuò)的地方,一定要和你安裝的Python和VS2012的路徑保持一致,編輯好后,把它放置在Home目錄下邊,如下圖位置所示:
三、測試你的安裝配置有沒有成功
在這里仍然使用上一節(jié)的測試用例,代碼如下:
| <a target=_blank id="L1" href="http://blog.csdn.net/baigoocn/article/details/36188029#L1" rel="#L1" style="color: rgb(102, 102, 102); text-decoration: none;"> 1</a> <a target=_blank id="L2" href="http://blog.csdn.net/baigoocn/article/details/36188029#L2" rel="#L2" style="color: rgb(102, 102, 102); text-decoration: none;"> 2</a> <a target=_blank id="L3" href="http://blog.csdn.net/baigoocn/article/details/36188029#L3" rel="#L3" style="color: rgb(102, 102, 102); text-decoration: none;"> 3</a> <a target=_blank id="L4" href="http://blog.csdn.net/baigoocn/article/details/36188029#L4" rel="#L4" style="color: rgb(102, 102, 102); text-decoration: none;"> 4</a> <a target=_blank id="L5" href="http://blog.csdn.net/baigoocn/article/details/36188029#L5" rel="#L5" style="color: rgb(102, 102, 102); text-decoration: none;"> 5</a> <a target=_blank id="L6" href="http://blog.csdn.net/baigoocn/article/details/36188029#L6" rel="#L6" style="color: rgb(102, 102, 102); text-decoration: none;"> 6</a> <a target=_blank id="L7" href="http://blog.csdn.net/baigoocn/article/details/36188029#L7" rel="#L7" style="color: rgb(102, 102, 102); text-decoration: none;"> 7</a> | 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) |
?來自CODE的代碼片 Python_Theano_test.py
在Visual Studio 2012中執(zhí)行之后可以看到如下的結(jié)果:當(dāng)看到"Using gpu device 0: GeForce GTX 750 Ti"這樣的字眼之后,恭喜你,你搭建的CUDA平臺(tái)安裝配置工作已經(jīng)完成,接下來就可以進(jìn)行Deep Learning的學(xué)習(xí)了。
總結(jié)
以上是生活随笔為你收集整理的Windows8.1 64bit环境下搭建深度学习平台之CUDA安装与配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: auto_ptr和shared_ptr
- 下一篇: java信息管理系统总结_java实现科