Windows7 下安装Theano (Install Theano in Windows 7)

Windows7 下安装Theano(PyCharm开发环境)Install Theano in Window 7, with IDE PyCharm


OS: Win 7

GPU: NVIDIA GeForce GTX TITANX

CUDA: 7.5

It's OK for me to follow the Theano offical website to install all the needed components, including:

1. Visual Studio Professional 2010

2. CUDA 7.5

3. MicroSoft Visual C++ Compiler for Python 2.7

4. download stdint.h file

5. TDM GCC

6. WinPython

7. configure Environment with the env.bat file. Check the gcc, gendef, cl, nvcc with the 'where' command. It's ok to see that there are two paths for gcc, gendef.

8. create the link library for GCC.

9. download Theano and run the set.py via the env.bat. (although I can't find the PYTHON_PATH environment variable after that)

10. test with CPU.

11. create the .theanorc.txt in the 'setting' file. Here it's important:

[global]

device=gpu

floatX=float32

[nvcc]

compiler_bindir=D:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin


Originally, I used the command like 'flags=--use-local-env  --cl-version=2010', I encountered the error like: "unsupported Microsoft Visual Studio version, only support ...". After I changed the nvcc setting as above suggested in this site: http://stackoverflow.com/questions/25729969/installing-theano-on-windows-8-with-gpu-enabled, then GPU can be used!


[Other problems encountered]

1. 'The g++ compiler is not detected!'

Solve: Put the 'include' and 'bin' path of your gcc compiler to your 'path' environment variable. Restart your PyCharm IDE.

useful link: http://www.cnblogs.com/daleloogn/p/4544633.html

2. Unable to load trained model file, with the error 'EOFError'

Solve: use 'wb' and 'rb' in model saving and loading for Windows, rather than the 'w' and 'r' which is only suitable for Linux.

useful link: http://stackoverflow.com/questions/2187558/python-2-6-cpickle-load-results-in-eoferror

3. Run Theano with GPU using PyCharm

Solve: put the configuration file .theanorc.txt to your user root file as denoted in this blog: http://www.cnblogs.com/daleloogn/p/4544633.html



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值